Jens-G edited a comment on pull request #2134:
URL: https://github.com/apache/thrift/pull/2134#issuecomment-626130834


   Plus, I found this statement in the comments at 
   https://www.php.net/manual/en/function.fwrite.php#96951
   
   > After having **problems with fwrite() returning 0 in cases where one would 
fully expect a return value of false**, I took a look at the source code for 
php's fwrite() itself. The function will only return false if you pass in 
invalid arguments. **Any other error, just as a broken pipe or closed 
connection, will result in a return value of less than strlen($string), in most 
cases 0.**
   
   If that is true then both the docs and all code relying on it are broken.
   
   So why don't we just check for $written being less/equal 0 instead of `=== 
-1`) ? Wouldn't that suffice?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to