jenkins-bot has submitted this change and it was merged. Change subject: GlobalVarConfig shouldn't throw exceptions for null-valued config settings ......................................................................
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 (cherry picked from commit 1a059dbbe2380e9ae752daf6c5583333b5bd5f07) --- M includes/config/GlobalVarConfig.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/config/GlobalVarConfig.php b/includes/config/GlobalVarConfig.php index 61a76b7..0d7f3f0 100644 --- a/includes/config/GlobalVarConfig.php +++ b/includes/config/GlobalVarConfig.php @@ -69,7 +69,7 @@ */ 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 ]; -- To view, visit https://gerrit.wikimedia.org/r/141680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9beabd79e1d52966b9184c9647af5a2a31c19276 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.24wmf10 Gerrit-Owner: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Manybubbles <never...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits