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

Supressed error when shell_exec is disallowed #30

Open
troendheim opened this issue Nov 8, 2018 · 0 comments
Open

Supressed error when shell_exec is disallowed #30

troendheim opened this issue Nov 8, 2018 · 0 comments

Comments

@troendheim
Copy link

When shell_exec has been disabled through the "disable_functions" php-setting, the run-method silently fails and sets pid = 0.

This happens as you cast to integer on the following line:
https://github.com/cocur/background-process/blob/master/src/BackgroundProcess.php#L74

shell_exec returns null when an error occurs - (int) null === 0.
A RuntimeException should be thrown if shell_exec returns null.

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