From 1a059dbbe2380e9ae752daf6c5583333b5bd5f07 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 23 Jun 2014 13:03:53 -0400 Subject: [PATCH] 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 --- includes/config/GlobalVarConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]; -- 2.20.1