From 477082146bf508d7ab1f7b094d5f45a0589e2d00 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 30 Sep 2009 18:13:27 +0000 Subject: [PATCH] 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. --- lib/weblib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 0c3bd743b5..131f0f6516 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3151,7 +3151,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) { $backtrace = debug_backtrace(); } $from = format_backtrace($backtrace, CLI_SCRIPT); - if ($CFG->debugdisplay || empty($UNITTEST->running)) { + if ($CFG->debugdisplay || isset($UNITTEST->running)) { // When the unit tests are running, any call to trigger_error // is intercepted by the test framework and reported as an exception. // Therefore, we cannot use trigger_error during unit tests. -- 2.39.5