Supressed error when shell_exec is disallowed
Opened this issue · 0 comments
troendheim commented
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
.