X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FconvertExtensionToRegistration.php;h=24391c1ce4140d0fdb5c190d3bcf5f2d946810eb;hb=7ddb8c2d62433a32aad4458cf0efb8b51f0467e2;hp=e83d7c63ac8a4b0634046aaa561e0b2aa379dc1e;hpb=9a7d6ef88c95b9819e4e11df5e17571957eaf9fd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index e83d7c63ac..24391c1ce4 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -66,7 +66,7 @@ class ConvertExtensionToRegistration extends Maintenance { $processor = new ReflectionClass( 'ExtensionProcessor' ); $settings = $processor->getProperty( 'globalSettings' ); $settings->setAccessible( true ); - return $settings->getValue() + $this->formerGlobals; + return array_merge( $settings->getValue(), $this->formerGlobals ); } public function execute() { @@ -82,7 +82,7 @@ class ConvertExtensionToRegistration extends Maintenance { unset( $var ); $arg = $this->getArg( 0 ); if ( !is_file( $arg ) ) { - $this->error( "$arg is not a file.", true ); + $this->fatalError( "$arg is not a file." ); } require $arg; unset( $arg ); @@ -160,14 +160,14 @@ class ConvertExtensionToRegistration extends Maintenance { protected function handleExtensionFunctions( $realName, $value ) { foreach ( $value as $func ) { if ( $func instanceof Closure ) { - $this->error( "Error: Closures cannot be converted to JSON. " . - "Please move your extension function somewhere else.", 1 + $this->fatalError( "Error: Closures cannot be converted to JSON. " . + "Please move your extension function somewhere else." ); } // check if $func exists in the global scope if ( function_exists( $func ) ) { - $this->error( "Error: Global functions cannot be converted to JSON. " . - "Please move your extension function ($func) into a class.", 1 + $this->fatalError( "Error: Global functions cannot be converted to JSON. " . + "Please move your extension function ($func) into a class." ); } } @@ -239,14 +239,14 @@ class ConvertExtensionToRegistration extends Maintenance { } foreach ( $handlers as $func ) { if ( $func instanceof Closure ) { - $this->error( "Error: Closures cannot be converted to JSON. " . - "Please move the handler for $hookName somewhere else.", 1 + $this->fatalError( "Error: Closures cannot be converted to JSON. " . + "Please move the handler for $hookName somewhere else." ); } // Check if $func exists in the global scope if ( function_exists( $func ) ) { - $this->error( "Error: Global functions cannot be converted to JSON. " . - "Please move the handler for $hookName inside a class.", 1 + $this->fatalError( "Error: Global functions cannot be converted to JSON. " . + "Please move the handler for $hookName inside a class." ); } }