X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FvalidateRegistrationFile.php;h=4b07796d2f68016143bb4974d7f27d8a03f082d8;hb=e9edf8e6ac3ef0b31b5d68957bdf1e40fb7e5012;hp=aa1f668d3ba30227a4e8298277f2e550fbdf3044;hpb=d56b46598d58f16eb8d7c8252083bbf3844e5430;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/validateRegistrationFile.php b/maintenance/validateRegistrationFile.php index aa1f668d3b..4b07796d2f 100644 --- a/maintenance/validateRegistrationFile.php +++ b/maintenance/validateRegistrationFile.php @@ -9,7 +9,7 @@ class ValidateRegistrationFile extends Maintenance { } public function execute() { $validator = new ExtensionJsonValidator( function ( $msg ) { - $this->error( $msg, 1 ); + $this->fatalError( $msg ); } ); $validator->checkDependencies(); $path = $this->getArg( 0 ); @@ -17,10 +17,10 @@ class ValidateRegistrationFile extends Maintenance { $validator->validate( $path ); $this->output( "$path validates against the schema!\n" ); } catch ( ExtensionJsonValidationError $e ) { - $this->error( $e->getMessage(), 1 ); + $this->fatalError( $e->getMessage() ); } } } -$maintClass = 'ValidateRegistrationFile'; +$maintClass = ValidateRegistrationFile::class; require_once RUN_MAINTENANCE_IF_MAIN;