X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FupdateExtensionJsonSchema.php;h=18c71a3eaf053c76011319b295face58230e9c82;hp=a27c8a517f9d66ba5754af850d3686808b63e412;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hpb=a1bbdcb62913b22f28838e647a15fe5e070d6e92 diff --git a/maintenance/updateExtensionJsonSchema.php b/maintenance/updateExtensionJsonSchema.php index a27c8a517f..18c71a3eaf 100644 --- a/maintenance/updateExtensionJsonSchema.php +++ b/maintenance/updateExtensionJsonSchema.php @@ -18,7 +18,7 @@ class UpdateExtensionJsonSchema extends Maintenance { } $json = FormatJson::decode( file_get_contents( $filename ), true ); - if ( $json === null ) { + if ( !is_array( $json ) ) { $this->fatalError( "Error: Invalid JSON" ); } @@ -34,6 +34,7 @@ class UpdateExtensionJsonSchema extends Maintenance { while ( $json['manifest_version'] !== ExtensionRegistry::MANIFEST_VERSION ) { $json['manifest_version'] += 1; $func = "updateTo{$json['manifest_version']}"; + // @phan-suppress-next-line PhanUndeclaredMethod $this->$func( $json ); }