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

prevent warning when pcntl_fork() is on disable_functions php.ini bla… #1476

Merged
merged 5 commits into from
Jan 6, 2018

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 27, 2017

…cklist

Q A
Bug fix? Yes
New feature? No
BC breaks? No
Deprecations? No
Fixed tickets N/A

pcntl_fork is blacklisted per default on ubuntu lts boxes. make sure deployer doesnt emit a warning in this case.

Without this fix you get

PHP Warning:  pcntl_fork() has been disabled for security reasons in phar:///usr/local/bin/dep/src/Utility/Reporter.php on line 22

@@ -17,7 +17,7 @@ class Reporter
public static function report(array $stats)
{
$pid = null;
if (extension_loaded('pcntl')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to use function_exists? If it available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function_exists also works. I feel it is less expressive, but nevertheless changed it.

@staabm
Copy link
Contributor Author

staabm commented Jan 6, 2018

Friendly ping @antonmedv

@antonmedv antonmedv closed this Jan 6, 2018
@antonmedv antonmedv reopened this Jan 6, 2018
@staabm
Copy link
Contributor Author

staabm commented Jan 6, 2018

Fixed build

@antonmedv antonmedv merged commit 703292c into deployphp:master Jan 6, 2018
@staabm staabm deleted the patch-7 branch January 6, 2018 14:07
antonmedv pushed a commit that referenced this pull request Apr 18, 2018
#1476)

* prevent warning when pcntl_fork() is on disable_functions php.ini blacklist

* Update CHANGELOG.md

* Update Reporter.php

* Update CHANGELOG.md
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

Successfully merging this pull request may close these issues.

2 participants