1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +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; $global['bypassSameDomainCheck'] = 1;
inputToRequest(); 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("REQUEST: " . json_encode($_REQUEST));
_error_log("POST: " . json_encode($_REQUEST)); _error_log("POST: " . json_encode($_REQUEST));
_error_log("GET: " . json_encode($_GET)); _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/user.php';
require_once $global['systemRootPath'] . 'objects/category.php'; require_once $global['systemRootPath'] . 'objects/category.php';
error_reporting(E_ALL & ~E_DEPRECATED);
$obj = new stdClass(); $obj = new stdClass();
$obj->error = true; $obj->error = true;
$obj->msg = true; $obj->msg = true;

View file

@ -10740,3 +10740,13 @@ function getDockerStatsURL()
{ {
return getDockerInternalURL() . "stat"; 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) { } catch (Exception $exc) {
echo $exc->getTraceAsString(); echo $exc->getTraceAsString();
} }
error_reporting(error_reporting() & ~E_DEPRECATED);
$global['webSiteRootURL'] .= (substr($global['webSiteRootURL'], -1) == '/' ? '' : '/'); $global['webSiteRootURL'] .= (substr($global['webSiteRootURL'], -1) == '/' ? '' : '/');
$global['systemRootPath'] .= (substr($global['systemRootPath'], -1) == '/' ? '' : '/'); $global['systemRootPath'] .= (substr($global['systemRootPath'], -1) == '/' ? '' : '/');
$global['session_name'] = md5($global['systemRootPath']); $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/user.php';
require_once $global['systemRootPath'] . 'objects/video.php'; require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php'; require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
set_error_reporting();
setSiteLang(); setSiteLang();
adminSecurityCheck(); adminSecurityCheck();

View file

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

View file

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

View file

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

View file

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

View file

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