From: moodler Date: Sat, 7 Aug 2004 03:59:53 +0000 (+0000) Subject: mtrace now works properly for web display too X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=622ebc6a7cc4b67557005b60b649ed6219800012;p=moodle.git mtrace now works properly for web display too --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 6fda3049b3..302acd3c8e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2868,7 +2868,13 @@ function address_in_subnet($addr, $subnetstr) { function mtrace($string, $eol="\n") { // For outputting debugging info - fwrite(STDOUT, $string.$eol); + + if (defined('STDOUT')) { + fwrite(STDOUT, $string.$eol); + } else { + echo "$string$eol"; + } + flush(); }