From: Aaron Schulz Date: Wed, 13 Feb 2013 18:56:22 +0000 (-0800) Subject: Treat a null result of Job::run() like "true". X-Git-Tag: 1.31.0-rc.0~20703 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=3283a2dd0aefe585d0f783db380b538f13b30279;p=lhc%2Fweb%2Fwiklou.git Treat a null result of Job::run() like "true". Change-Id: Ie5b725b9d8aad9d6b1869242e82b13306b61478f --- diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 3fc928843b..f64b5e82f7 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -90,15 +90,16 @@ class RunJobs extends Maintenance { // Perform the job (logging success/failure and runtime)... $t = microtime( true ); $this->runJobsLog( $job->toString() . " STARTING" ); - $status = $job->run(); - if( !is_bool( $status ) ) { - wfWarn( $job->toString() . ' must return boolean and didn\'t!' ); + $status = $job->run(); + if ( !is_bool( $status ) ) { + wfWarn( $job->getType() . " job failed to return a boolean." ); + $status = true; // sanity } - if ( $status ) { $group->ack( $job ); // done } + $t = microtime( true ) - $t; $timeMs = intval( $t * 1000 ); if ( !$status ) {