From: Brad Jorsch Date: Mon, 23 Jun 2014 17:03:53 +0000 (-0400) Subject: GlobalVarConfig shouldn't throw exceptions for null-valued config settings X-Git-Tag: 1.31.0-rc.0~15285^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=commitdiff_plain;h=1a059dbbe2380e9ae752daf6c5583333b5bd5f07;p=lhc%2Fweb%2Fwiklou.git GlobalVarConfig shouldn't throw exceptions for null-valued config settings Use array_key_exists rather than isset to test $GLOBALS. Bug: 66986 Change-Id: I9beabd79e1d52966b9184c9647af5a2a31c19276 --- diff --git a/includes/config/GlobalVarConfig.php b/includes/config/GlobalVarConfig.php index 61a76b7617..0d7f3f06c9 100644 --- a/includes/config/GlobalVarConfig.php +++ b/includes/config/GlobalVarConfig.php @@ -69,7 +69,7 @@ class GlobalVarConfig implements Config { */ protected function getWithPrefix( $prefix, $name ) { $var = $prefix . $name; - if ( !isset( $GLOBALS[ $var ] ) ) { + if ( !array_key_exists( $var, $GLOBALS ) ) { throw new ConfigException( __METHOD__ . ": undefined variable: '$var'" ); } return $GLOBALS[ $var ];