Update Core libs to avoid notice errors, add debug override switch

$DEBUG_ALL_OVERRIDE added to not override the set
$DEBUG_ALL/$PRINT_ALL/etc switches on one script.

Fix various notice bugs on very strict PHP setups.
This commit is contained in:
Clemens Schwaighofer
2015-11-06 11:43:01 +09:00
parent d67a4231c3
commit ae1ef182ef
4 changed files with 16 additions and 9 deletions

View File

@@ -1,11 +1,11 @@
<?
$DEBGU_ALL_OVERRIDE = 0; // set to 1 to debug on live/remote server locations
$DEBUG_ALL = 1;
$PRINT_ALL = 1;
$DB_DEBUG = 1;
if ($DEBUG_ALL)
error_reporting(E_ALL | E_STRICT | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
require('libs/Error.Handling.inc');
define('USE_DATABASE', true);
// sample config

View File

@@ -91,12 +91,15 @@
//------------------------------ page rights ned
// automatic hide for DEBUG messages on live server
if (TARGET == 'live' || TARGET == 'remote')
// can be overridden when setting DEBUG_ALL_OVERRIDE on top of the script (for emergency debugging of one page only)
if ((TARGET == 'live' || TARGET == 'remote') && !$DEBUG_ALL_OVERRIDE)
{
$login->debug_output_all = 0;
$cms->debug_output_all = 1;
$login->echo_output_all = 0;
$login->print_output_all = 0;
$cms->debug_output_all = 0;
$cms->echo_output_all = 0;
$cms->print_output_all = 1;
$cms->print_output_all = 0;
}
$cms->DATA['JS_DEBUG'] = DEBUG;
?>