mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-13 18:07:00 +00:00
GenerateFancyCaptchas: Include stderr result if captcha.py returns an error code
Bug: T360653 Change-Id: Ie998180e5a74441c76e236074961cf0d34aaecaf
This commit is contained in:
parent
8ecf38e408
commit
9751db5f18
|
@ -129,10 +129,14 @@ class GenerateFancyCaptchas extends Maintenance {
|
|||
->limits( [ 'time' => 0 ] )
|
||||
->disableSandbox()
|
||||
->execute();
|
||||
if ( $result->getExitCode() != 0 ) {
|
||||
if ( $result->getExitCode() !== 0 ) {
|
||||
$this->output( " Failed.\n" );
|
||||
wfRecursiveRemoveDir( $tmpDir );
|
||||
$this->fatalError( "An error occurred when running $captchaScript.\n", 1 );
|
||||
|
||||
$this->fatalError(
|
||||
"An error occurred when running $captchaScript:\n{$result->getStderr()}\n",
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
$captchaTime += microtime( true );
|
||||
|
|
Loading…
Reference in a new issue