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

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.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

please apply fabbot's patch and good to me

@BenMorel
Copy link
Contributor Author

@nicolas-grekas Done!

@fabpot
Copy link
Member

fabpot commented Mar 20, 2020

Thank you @BenMorel.

@BenMorel
Copy link
Contributor Author

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
Development

Successfully merging this pull request may close these issues.

None yet

5 participants