1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Daniel Neto 2023-03-11 19:35:40 -03:00
parent d50a618c41
commit 12a47cb43e
9 changed files with 132 additions and 137 deletions

View file

@ -11,12 +11,6 @@ if (!isset($global['systemRootPath'])) {
$global['bypassSameDomainCheck'] = 1;
inputToRequest();
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_DEPRECATED);
*/
_error_log("REQUEST: " . json_encode($_REQUEST));
_error_log("POST: " . json_encode($_REQUEST));
_error_log("GET: " . json_encode($_GET));

View file

@ -7,8 +7,6 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/category.php';
error_reporting(E_ALL & ~E_DEPRECATED);
$obj = new stdClass();
$obj->error = true;
$obj->msg = true;

View file

@ -10740,3 +10740,13 @@ function getDockerStatsURL()
{
return getDockerInternalURL() . "stat";
}
function set_error_reporting() {
if (!empty($global['debug'])) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
}else{
error_reporting(E_ERROR);
ini_set('display_errors', 0);
}
}

View file

@ -59,7 +59,7 @@ try {
} catch (Exception $exc) {
echo $exc->getTraceAsString();
}
error_reporting(error_reporting() & ~E_DEPRECATED);
$global['webSiteRootURL'] .= (substr($global['webSiteRootURL'], -1) == '/' ? '' : '/');
$global['systemRootPath'] .= (substr($global['systemRootPath'], -1) == '/' ? '' : '/');
$global['session_name'] = md5($global['systemRootPath']);
@ -180,6 +180,7 @@ require_once $global['systemRootPath'] . 'objects/plugin.php';
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
set_error_reporting();
setSiteLang();
adminSecurityCheck();

View file

@ -1,7 +1,6 @@
<?php
$config = dirname(__FILE__) . '/../../../videos/configuration.php';
require_once $config;
error_reporting(E_ALL & ~E_DEPRECATED);
if (!isCommandLineInterface()) {
return die('Command Line only');

View file

@ -2,7 +2,6 @@
$config = dirname(__FILE__) . '/../../../videos/configuration.php';
require_once $config;
error_reporting(E_ALL & ~E_DEPRECATED);
if (!isCommandLineInterface()) {
return die('Command Line only');

View file

@ -22,8 +22,6 @@ if (empty($isCDNEnabled)) {
ob_end_flush();
set_time_limit(0);
ini_set('max_execution_time', 0);
error_reporting(E_ALL & ~E_DEPRECATED);
ini_set('display_errors', '1');
/**
* @var mixed[] $global
*/

View file

@ -18,8 +18,6 @@ $index = intval(@$argv[2]);
ob_end_flush();
set_time_limit(300);
ini_set('max_execution_time', 300);
error_reporting(E_ALL & ~E_DEPRECATED);
ini_set('display_errors', '1');
$global['rowCount'] = $global['limitForUnlimitedVideos'] = 999999;
$path = getVideosDir();

View file

@ -21,8 +21,6 @@ $_2hours = $_1hour*2;
ob_end_flush();
set_time_limit($_2hours);
ini_set('max_execution_time', $_2hours);
error_reporting(E_ALL & ~E_DEPRECATED);
ini_set('display_errors', '1');
$sort = @$argv[1];
if(strtolower($sort) !== 'asc'){