-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Process] Fix write access check for pipes on Windows #19428
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
[Process] Fix write access check for pipes on Windows #19428
Conversation
nicolas-grekas
commented
Jul 26, 2016
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #19336, #19416 |
License | MIT |
Doc PR | - |
$h = fopen($file, 'xb'); | ||
if (!$h && false === strpos($error, 'File exists')) { | ||
restore_error_handler(); | ||
throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
A temporary file could not be opened to write the process output to. Verify that your TEMP environment variable is writable.
I've changed it to a full stop before Verify and added one on the end for consistency with other exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't change exception messages in minor versions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can, then I'd even prefer: sprintf('A temporary file could not be opened to write the process output: %s', $error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
cf43e63
to
dab172e
Compare
dab172e
to
66e694e
Compare
Status: Reviewed Thank you for this quick PR. I was waiting for the author of #19336 to test his issue but it's been over a week, so at least for me this fixes my issue and should also fix his. |
Thanks. The warning should be gone btw. |
…olas-grekas) This PR was merged into the 2.7 branch. Discussion ---------- [Process] Fix write access check for pipes on Windows | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19336, #19416 | License | MIT | Doc PR | - Commits ------- 66e694e [Process] Fix write access check for pipes on Windows