From: jenkins-bot Date: Mon, 25 Sep 2017 16:30:57 +0000 (+0000) Subject: Merge "getConfiguration: Don't bail when a valid variable is set null" X-Git-Tag: 1.31.0-rc.0~1970 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=fc5af1cb1c6fe7516fa045c90187d7def05223ba;hp=5e899b366ce2bee773d587b998660186268f817e;p=lhc%2Fweb%2Fwiklou.git Merge "getConfiguration: Don't bail when a valid variable is set null" --- diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 3c679e6e7a..65ffe1422b 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -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." );