Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable: exitStatus #101

Open
MiRacLe-RPZ opened this issue Sep 1, 2021 · 0 comments
Open

Undefined variable: exitStatus #101

MiRacLe-RPZ opened this issue Sep 1, 2021 · 0 comments

Comments

@MiRacLe-RPZ
Copy link
Contributor

                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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant