Skip to content

Undefined variable: exitStatus #101

@MiRacLe-RPZ

Description

@MiRacLe-RPZ
                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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions