Merge "getConfiguration: Don't bail when a valid variable is set null"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 25 Sep 2017 16:30:57 +0000 (16:30 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 25 Sep 2017 16:30:57 +0000 (16:30 +0000)
maintenance/getConfiguration.php

index 3c679e6..65ffe14 100644 (file)
@@ -101,7 +101,7 @@ class GetConfiguration extends Maintenance {
                        foreach ( $this->settings_list as $name ) {
                                if ( !preg_match( '/^wg[A-Z]/', $name ) ) {
                                        throw new MWException( "Variable '$name' does start with 'wg'." );
-                               } elseif ( !isset( $GLOBALS[$name] ) ) {
+                               } elseif ( !array_key_exists( $name, $GLOBALS ) ) {
                                        throw new MWException( "Variable '$name' is not set." );
                                } elseif ( !$this->isAllowedVariable( $GLOBALS[$name] ) ) {
                                        throw new MWException( "Variable '$name' includes non-array, non-scalar, items." );