From d9d61fa340198b344d4fd340f5a461350cb16ff9 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 30 Mar 2012 19:19:06 +0200 Subject: [PATCH] MDL-32251 use standard PHP debug levels instead of original 38911 --- config-dist.php | 8 ++++---- lib/installlib.php | 4 ++-- lib/simpletest/testmoodlelib.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config-dist.php b/config-dist.php index 4919ed14bee..0aec77a0dd4 100644 --- a/config-dist.php +++ b/config-dist.php @@ -420,10 +420,10 @@ $CFG->admin = 'admin'; //========================================================================= // // Force a debugging mode regardless the settings in the site administration -// @error_reporting(1023); // NOT FOR PRODUCTION SERVERS! -// @ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS! -// $CFG->debug = 38911; // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS! -// $CFG->debugdisplay = true; // NOT FOR PRODUCTION SERVERS! +// @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS! +// @ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS! +// $CFG->debug = (E_ALL | E_STRICT); // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS! +// $CFG->debugdisplay = 1; // NOT FOR PRODUCTION SERVERS! // // You can specify a comma separated list of user ids that that always see // debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay diff --git a/lib/installlib.php b/lib/installlib.php index 566bc8cb3c6..148dfb484c7 100644 --- a/lib/installlib.php +++ b/lib/installlib.php @@ -402,9 +402,9 @@ function install_cli_database(array $options, $interactive) { require_once($CFG->libdir.'/upgradelib.php'); // show as much debug as possible - @error_reporting(1023); + @error_reporting(E_ALL | E_STRICT); @ini_set('display_errors', '1'); - $CFG->debug = 38911; + $CFG->debug = (E_ALL | E_STRICT); $CFG->debugdisplay = true; $CFG->version = ''; diff --git a/lib/simpletest/testmoodlelib.php b/lib/simpletest/testmoodlelib.php index 0142a665aa0..3cc7e598e8e 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -369,7 +369,7 @@ class moodlelib_test extends UnitTestCase { // make sure warning is displayed if array submitted - TODO: throw exception in Moodle 2.3 $debugging = isset($CFG->debug) ? $CFG->debug : null; $debugdisplay = isset($CFG->debugdisplay) ? $CFG->debugdisplay : null; - $CFG->debug = 38911; + $CFG->debug = DEBUG_DEVELOPER; $CFG->debugdisplay = true; ob_start(); @@ -441,7 +441,7 @@ class moodlelib_test extends UnitTestCase { // do not allow non-arrays $debugging = isset($CFG->debug) ? $CFG->debug : null; $debugdisplay = isset($CFG->debugdisplay) ? $CFG->debugdisplay : null; - $CFG->debug = 38911; + $CFG->debug = DEBUG_DEVELOPER; $CFG->debugdisplay = true; ob_start(); @@ -511,7 +511,7 @@ class moodlelib_test extends UnitTestCase { // make sure warning is displayed if array submitted - TODO: throw exception in Moodle 2.3 $debugging = isset($CFG->debug) ? $CFG->debug : null; $debugdisplay = isset($CFG->debugdisplay) ? $CFG->debugdisplay : null; - $CFG->debug = 38911; + $CFG->debug = DEBUG_DEVELOPER; $CFG->debugdisplay = true; ob_start(); @@ -583,7 +583,7 @@ class moodlelib_test extends UnitTestCase { // do not allow non-arrays $debugging = isset($CFG->debug) ? $CFG->debug : null; $debugdisplay = isset($CFG->debugdisplay) ? $CFG->debugdisplay : null; - $CFG->debug = 38911; + $CFG->debug = DEBUG_DEVELOPER; $CFG->debugdisplay = true; // make sure array keys are sanitised