Merge "Give TestCase::checkHasDiff3 a better name"
[lhc/web/wiklou.git] / maintenance / getConfiguration.php
index 1db53f3..b1140ec 100644 (file)
@@ -49,7 +49,7 @@ class GetConfiguration extends Maintenance {
 
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Get serialized MediaWiki site configuration";
+               $this->addDescription( 'Get serialized MediaWiki site configuration' );
                $this->addOption( 'regex', 'regex to filter variables with', false, true );
                $this->addOption( 'iregex', 'same as --regex but case insensitive', false, true );
                $this->addOption( 'settings', 'Space-separated list of wg* variables', false, true );
@@ -87,7 +87,7 @@ class GetConfiguration extends Maintenance {
        public function finalSetup() {
                parent::finalSetup();
 
-               $this->regex = $this->getOption( 'regex' ) ? : $this->getOption( 'iregex' );
+               $this->regex = $this->getOption( 'regex' ) ?: $this->getOption( 'iregex' );
                if ( $this->regex ) {
                        $this->regex = '/' . $this->regex . '/';
                        if ( $this->hasOption( 'iregex' ) ) {
@@ -184,7 +184,7 @@ class GetConfiguration extends Maintenance {
                        }
 
                        return true;
-               } elseif ( is_scalar( $value ) ) {
+               } elseif ( is_scalar( $value ) || $value === null ) {
                        return true;
                }