Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix error checking on Zend\Http\Client\Adapter\Socket->write(). #3033

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

peterhil commented Nov 20, 2012

This failed on CLI usage, giving:
Notice: fwrite(): send of 8192 bytes failed with errno=32 Broken pipe in [a-symfony-project-name-held]/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Socket.php on line 361

The PHP fwrite function can returns the bytes written, which can be 0 – and returns false on error:
"fwrite() returns the number of bytes written, or FALSE on error."
http://php.net/manual/en/function.fwrite.php

This breaks the ZendService\Amazon\S3\S3->putFile(), when called from a CLI PHP script (using Symfony console).

@peterhil peterhil referenced this pull request in xi-project/xi-filelib Nov 20, 2012

Closed

Fixed Amazon S3 client #104

Member

Ocramius commented Nov 21, 2012

@peterhil can you please test this by writing an empty string to the socket?

Nevermind, I'm trying to write the test myself :)

Ocramius added a commit to Ocramius/zf2 that referenced this pull request Nov 21, 2012

@Ocramius Ocramius referenced this pull request Nov 21, 2012

Closed

Hotfix/issue #3033 #3049

Member

Ocramius commented Nov 21, 2012

Handled in #3049

weierophinney added a commit that referenced this pull request Dec 10, 2012

@ghost ghost assigned weierophinney Dec 10, 2012

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment