Fixup some SELECT * usages in sqlite schema patches
[lhc/web/wiklou.git] / maintenance / updateExtensionJsonSchema.php
index 427769f..46c8b77 100644 (file)
@@ -14,12 +14,12 @@ class UpdateExtensionJsonSchema extends Maintenance {
        public function execute() {
                $filename = $this->getArg( 0 );
                if ( !is_readable( $filename ) ) {
-                       $this->error( "Error: Unable to read $filename", 1 );
+                       $this->fatalError( "Error: Unable to read $filename" );
                }
 
                $json = FormatJson::decode( file_get_contents( $filename ), true );
                if ( $json === null ) {
-                       $this->error( "Error: Invalid JSON", 1 );
+                       $this->fatalError( "Error: Invalid JSON" );
                }
 
                if ( !isset( $json['manifest_version'] ) ) {
@@ -57,7 +57,7 @@ class UpdateExtensionJsonSchema extends Maintenance {
                                        $json['config'][$name] = [ 'value' => $value ];
                                        if ( isset( $value[ExtensionRegistry::MERGE_STRATEGY] ) ) {
                                                $json['config'][$name]['merge_strategy'] = $value[ExtensionRegistry::MERGE_STRATEGY];
-                                               unset( $value[ExtensionRegistry::MERGE_STRATEGY] );
+                                               unset( $json['config'][$name]['value'][ExtensionRegistry::MERGE_STRATEGY] );
                                        }
                                }
                        }
@@ -65,5 +65,5 @@ class UpdateExtensionJsonSchema extends Maintenance {
        }
 }
 
-$maintClass = 'UpdateExtensionJsonSchema';
+$maintClass = UpdateExtensionJsonSchema::class;
 require_once RUN_MAINTENANCE_IF_MAIN;