From: urs_hunkler Date: Mon, 16 Jul 2007 20:59:38 +0000 (+0000) Subject: Added check if $PAGE is set. Seams that $PAGE is not set on all pages. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f0e4a5ee4f739409beb49173b09f29d55aa7da84;p=moodle.git Added check if $PAGE is set. Seams that $PAGE is not set on all pages. --- diff --git a/theme/custom_corners/header.html b/theme/custom_corners/header.html index f479b70860..3ce57de833 100644 --- a/theme/custom_corners/header.html +++ b/theme/custom_corners/header.html @@ -20,14 +20,15 @@ // either no custom corners or too much // all admin pages are build with the layout-table: sideblocks and content - if (($PAGE->type == 'admin') && (strstr($bodytags, ' nocoursepage'))) { + if (!empty($PAGE) && ($PAGE->type == 'admin') && (strstr($bodytags, ' nocoursepage'))) { $bodytags = str_replace(' nocoursepage', '', $bodytags); } // list of pages using the layout-table to be able to view sideblocks $excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view', 'my-index'); - if ((in_array($PAGE->type, $excludelist)) && + + if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) && (strstr($bodytags, ' nocoursepage'))) { $bodytags = str_replace(' nocoursepage', '', $bodytags); }