From: mjollnir_ Date: Mon, 13 Oct 2008 10:17:01 +0000 (+0000) Subject: tiny simpletest fix: start and end output buffering a bit more sensibly. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=915d745f2c6ac55cccd48c5a83a975d90b6267eb;p=moodle.git tiny simpletest fix: start and end output buffering a bit more sensibly. --- diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index f303838b69..814b7beb76 100644 --- a/lib/simpletestlib.php +++ b/lib/simpletestlib.php @@ -247,6 +247,7 @@ class MoodleUnitTestCase extends UnitTestCase { UnitTestDB::instantiate(); global $DB; $this->DB =& $DB; + ob_start(); } /** @@ -261,8 +262,9 @@ class MoodleUnitTestCase extends UnitTestCase { parent::tearDown(); // Output buffering - ob_end_flush(); - ob_start(); + if (ob_get_length() > 0) { + ob_end_flush(); + } } /**