Skip to content

Supressed error when shell_exec is disallowed #30

@troendheim

Description

@troendheim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions