From ef48f1f43563d2eccbc238a76f3f83d6a03feaa2 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Mon, 18 Aug 2008 14:51:10 +0000 Subject: [PATCH] Avoid notices: Before checking if retval is an array, check if it is defined. --- includes/SiteConfiguration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index ddaaa589fa..0ed768791c 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -46,7 +46,7 @@ class SiteConfiguration { // Do tag settings foreach ( $wikiTags as $tag ) { if ( array_key_exists( $tag, $thisSetting ) ) { - if ( is_array($retval) && is_array($thisSetting[$tag]) ) { + if ( isset($retval) && is_array($retval) && is_array($thisSetting[$tag]) ) { $retval = array_merge( $retval, $thisSetting[$tag] ); } else { $retval = $thisSetting[$tag]; @@ -61,7 +61,7 @@ class SiteConfiguration { // Do suffix settings if ( array_key_exists( $suffix, $thisSetting ) ) { - if ( is_array($retval) && is_array($thisSetting[$suffix]) ) { + if ( isset($retval) && is_array($retval) && is_array($thisSetting[$suffix]) ) { $retval = array_merge( $retval, $thisSetting[$suffix] ); } else { $retval = $thisSetting[$suffix]; @@ -75,7 +75,7 @@ class SiteConfiguration { // Fall back to default. if ( array_key_exists( 'default', $thisSetting ) ) { - if ( is_array($retval) && is_array($thisSetting['default']) ) { + if ( isset($retval) && is_array($retval) && is_array($thisSetting['default']) ) { $retval = array_merge( $retval, $thisSetting['default'] ); } else { $retval = $thisSetting['default']; -- 2.20.1