]> git.mjollnir.org Git - moodle.git/commitdiff
mtrace now works properly for web display too
authormoodler <moodler>
Sat, 7 Aug 2004 03:59:53 +0000 (03:59 +0000)
committermoodler <moodler>
Sat, 7 Aug 2004 03:59:53 +0000 (03:59 +0000)
lib/moodlelib.php

index 6fda3049b3073361e40491b3727f58a0b03a2257..302acd3c8e1bec8b896390c65a12797cbb54091f 100644 (file)
@@ -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();
 }