X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgetConfiguration.php;h=18dcc226da0dd0af75b7f7058baf07281607d137;hb=d48b7260f30c1ec57046a1f8e4c82057aed45e5f;hp=3c679e6e7ad29fb48bdd4b6d10cd44c5d1197497;hpb=687e779b97c059e55f423f97c2bb45e0512c1e77;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 3c679e6e7a..18dcc226da 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -64,7 +64,7 @@ class GetConfiguration extends Maintenance { $validFormat = in_array( $format, self::$outFormats ); if ( !$validFormat ) { - $this->error( "--format set to an unrecognized format", 0 ); + $this->error( "--format set to an unrecognized format" ); $error_out = true; } @@ -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." );