Improve error messages on deleteOldFancyCaptchas maintenance script

StatusValue::getErrors returns an array of messages, not strings.
It cannot be use on implode(). Use wikitext as it the most readable on
the console

Change-Id: I4b794597f9bf35d3bc34c7d2c7691ee53d43b017
This commit is contained in:
Umherirrender 2019-05-10 18:15:05 +02:00
parent 50ea5ffe3a
commit 911086980b

View file

@ -82,8 +82,9 @@ class DeleteOldFancyCaptchas extends Maintenance {
if ( $ret->isOK() ) { if ( $ret->isOK() ) {
$this->output( "$count old fancy captchas deleted.\n" ); $this->output( "$count old fancy captchas deleted.\n" );
} else { } else {
$status = Status::wrap( $ret );
$this->output( "Deleting old captchas errored.\n" ); $this->output( "Deleting old captchas errored.\n" );
$this->output( implode( "\n", $ret->getErrors() ) ); $this->output( $status->getWikiText( false, false, 'en' ) );
} }
} }
} }