MDL-12730 new debug levels (support strict) + upgrade from old ones

This commit is contained in:
Petr Skoda
2012-03-28 16:39:42 +02:00
committed by Eloy Lafuente (stronk7)
parent 0094c90c79
commit e63f95d7c1
3 changed files with 21 additions and 11 deletions
+10
View File
@@ -335,6 +335,16 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012032300.01);
}
if ($oldversion < 2012032300.02) {
// Migrate the old admin debug setting.
if ($CFG->debug == 38911) {
set_config('debug', DEBUG_DEVELOPER);
} else if ($CFG->debug == 6143) {
set_config('debug', DEBUG_ALL);
}
upgrade_main_savepoint(true, 2012032300.02);
}
return true;
}
+10 -10
View File
@@ -27,17 +27,17 @@
defined('MOODLE_INTERNAL') || die();
// Debug levels //
/** no warnings at all */
// Debug levels - always keep the values in ascending order!
/** No warnings and errors at all */
define('DEBUG_NONE', 0);
/** E_ERROR | E_PARSE */
define('DEBUG_MINIMAL', 5);
/** E_ERROR | E_PARSE | E_WARNING | E_NOTICE */
define('DEBUG_NORMAL', 15);
/** E_ALL without E_STRICT for now, do show recoverable fatal errors */
define('DEBUG_ALL', 6143);
/** DEBUG_ALL with extra Moodle debug messages - (DEBUG_ALL | 32768) */
define('DEBUG_DEVELOPER', 38911);
/** Fatal errors only */
define('DEBUG_MINIMAL', E_ERROR | E_PARSE);
/** Errors, warnings and notices */
define('DEBUG_NORMAL', E_ERROR | E_PARSE | E_WARNING | E_NOTICE);
/** All problems except strict PHP warnings */
define('DEBUG_ALL', E_ALL & ~E_STRICT);
/** DEBUG_ALL with all debug messages and strict warnings */
define('DEBUG_DEVELOPER', E_ALL | E_STRICT);
/** Remove any memory limits */
define('MEMORY_UNLIMITED', -1);
+1 -1
View File
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012032300.01; // YYYYMMDD = weekly release date of this DEV branch
$version = 2012032300.02; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes