]> git.mjollnir.org Git - moodle.git/commitdiff
unittests: NOBUG fix pagelib unit tests
authortjhunt <tjhunt>
Wed, 30 Sep 2009 22:35:48 +0000 (22:35 +0000)
committertjhunt <tjhunt>
Wed, 30 Sep 2009 22:35:48 +0000 (22:35 +0000)
Fix regression caused by my earlier commit.
(It was preventing a new install.)

lib/blocklib.php

index 9c3a0f64650850e220bda865b2499367b79be684..6f6aa04a6159658a59395f48a2f389eced6fe289 100644 (file)
@@ -368,7 +368,9 @@ class block_manager {
      */
     public function set_default_region($defaultregion) {
         $this->check_not_yet_loaded();
-        $this->check_region_is_known($defaultregion);
+        if ($defaultregion) {
+            $this->check_region_is_known($defaultregion);
+        }
         $this->defaultregion = $defaultregion;
     }