Diff of /moodle/lib/weblib.php
Parent Directory
|
Revision Log
|
Patch
|
By tjhunt:
unit tests: MDL-20398 spurious exceptions when $CFG->debugdisplay is false
Doh! I had the logic the wrong way round in my previous commit. Sorry.
|
| 3151 |
$backtrace = debug_backtrace(); |
$backtrace = debug_backtrace(); |
| 3152 |
} |
} |
| 3153 |
$from = format_backtrace($backtrace, CLI_SCRIPT); |
$from = format_backtrace($backtrace, CLI_SCRIPT); |
| 3154 |
if ($CFG->debugdisplay || empty($UNITTEST->running)) { |
if ($CFG->debugdisplay || isset($UNITTEST->running)) { |
| 3155 |
// When the unit tests are running, any call to trigger_error |
// When the unit tests are running, any call to trigger_error |
| 3156 |
// is intercepted by the test framework and reported as an exception. |
// is intercepted by the test framework and reported as an exception. |
| 3157 |
// Therefore, we cannot use trigger_error during unit tests. |
// Therefore, we cannot use trigger_error during unit tests. |
|
|
Legend:
| Removed from v.1.1340 |
|
| changed lines |
| |
Added in v.1.1341 |
|
|