]> git.mjollnir.org Git - moodle.git/commitdiff
More notices
authormoodler <moodler>
Mon, 9 Aug 2004 14:18:40 +0000 (14:18 +0000)
committermoodler <moodler>
Mon, 9 Aug 2004 14:18:40 +0000 (14:18 +0000)
index.php

index 80fdc6f0c5790527b1a633033c2f961ac94561cf..af08858d5e632e4f2b2fda151e820e124149365a 100644 (file)
--- a/index.php
+++ b/index.php
     }
 
     // If the block width cache is not set, set it
-    if(!isset($SESSION) or !isset($SESSION->blockcache->width->{$site->id}) or $editing) {
+    if(!isset($SESSION) or !isset($SESSION->blockcache) or 
+        !isset($SESSION->blockcache->width->{$site->id}) or $editing) {
         // This query might be optimized away if we 're in editing mode
         if(!isset($recblocks)) {
             $recblocks = get_records('blocks','visible','1');
         // But is there any real need to simplify the structure?
         $SESSION->blockcache->width->{$site->id}->left = $preferred_width_left;
         $SESSION->blockcache->width->{$site->id}->right = $preferred_width_right;
-    }
-    else {
+    } else {
         $preferred_width_left = $SESSION->blockcache->width->{$site->id}->left;
         $preferred_width_right = $SESSION->blockcache->width->{$site->id}->right;
     }