MDL-31006 fix various notices in PHP54

PHP54 compatibility
This commit is contained in:
Petr Skoda
2012-01-18 01:03:20 +01:00
committed by Eloy Lafuente (stronk7)
parent ae924874d7
commit b85b25ebb8
34 changed files with 71 additions and 17 deletions
+1 -1
View File
@@ -1675,7 +1675,7 @@ function generate_page_type_patterns($pagetype, $parentcontext = null, $currentc
// Ensure that the * pattern is always available if editing block 'at distance', so
// we always can 'bring back' it to the original context. MDL-30340
if ($currentcontext->id != $parentcontext->id && !isset($patterns['*'])) {
if ((!isset($currentcontext) or !isset($parentcontext) or $currentcontext->id != $parentcontext->id) && !isset($patterns['*'])) {
// TODO: We could change the string here, showing its 'bring back' meaning
$patterns['*'] = get_string('page-x', 'pagetype');
}