php-resque
php-resque copied to clipboard
Undefined variable: exitStatus
if (!pcntl_wifexited($status) or ($exitStatus = pcntl_wexitstatus($status)) !== 0) {
if ($this->job->getStatus() == Job::STATUS_FAILED) {
$this->log('Job '.$job.' failed: "'.$job->failError().'" in '.$this->job->execTimeStr(), Logger::ERROR);
} else {
$this->log('Job '.$job.' exited with code '.$exitStatus, Logger::ERROR);
$this->job->fail(new Exception\Dirty($exitStatus));
}
}
If child process was force killed after job completition, then pcntl_wifexited return non-zero status and $exitStatus still undefined:
Undefined variable: exitStatus in vendor/mjphaynes/php-resque/src/Resque/Worker.php on line 339