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 in proc_open() #36141

Merged
merged 1 commit into from Mar 20, 2020
Merged

Prevent warning in proc_open() #36141

merged 1 commit into from Mar 20, 2020

Conversation

@BenMorel
Copy link
Contributor

BenMorel commented Mar 19, 2020

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets none
License MIT
Doc PR none

In addition to returning false, proc_open() triggers a warning when it fails. For example:

Warning: proc_open(): fork failed - Cannot allocate memory

When using the ErrorHandler, the warning gets promoted to an exception, and the next line, if (! is_resource(..., is not executed. This mutes the warning and ensures that the next line is always executed and the proper exception is thrown.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Mar 19, 2020
Copy link
Member

nicolas-grekas left a comment

please apply fabbot's patch and good to me

@BenMorel

This comment has been minimized.

Copy link
Contributor Author

BenMorel commented Mar 19, 2020

@fabpot
fabpot approved these changes Mar 20, 2020
@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 20, 2020

Thank you @BenMorel.

@fabpot fabpot force-pushed the BenMorel:patch-8 branch from 76b8d53 to d43833a Mar 20, 2020
@fabpot fabpot merged commit 98da88f into symfony:3.4 Mar 20, 2020
1 check passed
1 check passed
fabbot.io Your code looks good.
Details
@BenMorel

This comment has been minimized.

Copy link
Contributor Author

BenMorel commented Mar 20, 2020

Thank you. Will this be merged in 4.x and 5.x?

This was referenced Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.