Legoktm 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 RELEASE-NOTES-1.23
M includes/config/GlobalVarConfig.php
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index d626737..ac274ca 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -8,6 +8,7 @@
 === Changes since 1.23.3 ===
 
 * (bug 65998) Make MySQLi work with non-standard socket.
+* (bug 66986) GlobalVarConfig shouldn't throw exceptions for null-valued 
config settings
 
 == MediaWiki 1.23.3 ==
 
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/160688
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9beabd79e1d52966b9184c9647af5a2a31c19276
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Lewis Cawte <le...@lewiscawte.me>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to