MDL-39474 fix incorrect bitwise ops when setting $CFG->debugdeveloper

This commit is contained in:
Petr Škoda
2013-08-21 13:38:33 +02:00
parent 52ec2a60f6
commit ce7b06bcd7
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -339,7 +339,7 @@ if (isset($CFG->debug)) {
} else {
$CFG->debug = 0;
}
$CFG->debugdeveloper = ($CFG->debug & E_ALL and $CFG->debug & E_STRICT); // DEBUG_DEVELOPER is not available yet.
$CFG->debugdeveloper = (($CFG->debug & (E_ALL | E_STRICT)) === (E_ALL | E_STRICT)); // DEBUG_DEVELOPER is not available yet.
if (!defined('MOODLE_INTERNAL')) { // Necessary because cli installer has to define it earlier.
/** Used by library scripts to check they are being called by Moodle. */
@@ -599,7 +599,7 @@ if (isset($CFG->debug)) {
} else {
$CFG->debug = 0;
}
$CFG->debugdeveloper = ($CFG->debug & DEBUG_DEVELOPER);
$CFG->debugdeveloper = (($CFG->debug & DEBUG_DEVELOPER) === DEBUG_DEVELOPER);
// Find out if PHP configured to display warnings,
// this is a security problem because some moodle scripts may