Skip to content

Supressed error when shell_exec is disallowed #30

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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