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 );
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' ) ) {
}
return true;
- } elseif ( is_scalar( $value ) ) {
+ } elseif ( is_scalar( $value ) || $value === null ) {
return true;
}