diff options
author | Remi Collet <remi@remirepo.net> | 2021-07-12 08:08:50 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-07-12 08:08:50 +0200 |
commit | 3ddc130b973884e89ed350c55898f5fdaabdc254 (patch) | |
tree | 0620e99cab80746a07f890c0cd3a2ce186ab8a7a /php-react-stream-php8.patch | |
parent | 8c9dfa70a939020cfa5b7f9b17e4bd14e4b59f54 (diff) |
Diffstat (limited to 'php-react-stream-php8.patch')
-rw-r--r-- | php-react-stream-php8.patch | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/php-react-stream-php8.patch b/php-react-stream-php8.patch deleted file mode 100644 index b973488..0000000 --- a/php-react-stream-php8.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up ./src/WritableResourceStream.php.php8 ./src/WritableResourceStream.php ---- ./src/WritableResourceStream.php.php8 2021-04-07 16:22:09.048553209 +0200 -+++ ./src/WritableResourceStream.php 2021-04-07 16:22:14.797526978 +0200 -@@ -117,10 +117,15 @@ final class WritableResourceStream exten - $error = $errstr; - }); - -- if ($this->writeChunkSize === -1) { -- $sent = \fwrite($this->stream, $this->data); -+ if (is_resource($this->stream)) { -+ if ($this->writeChunkSize === -1) { -+ $sent = \fwrite($this->stream, $this->data); -+ } else { -+ $sent = \fwrite($this->stream, $this->data, $this->writeChunkSize); -+ } - } else { -- $sent = \fwrite($this->stream, $this->data, $this->writeChunkSize); -+ $sent = 0; -+ $error = 'this is not a valid stream resource'; - } - - \restore_error_handler(); -diff -up ./tests/WritableStreamResourceTest.php.php8 ./tests/WritableStreamResourceTest.php ---- ./tests/WritableStreamResourceTest.php.php8 2021-04-07 16:18:25.234574523 +0200 -+++ ./tests/WritableStreamResourceTest.php 2021-04-07 16:18:44.985484393 +0200 -@@ -508,7 +508,7 @@ class WritableResourceStreamTest extends - $buffer->handleWrite(); - - $this->assertInstanceOf('Exception', $error); -- $this->assertSame('Unable to write to stream: fwrite(): send of 3 bytes failed with errno=32 Broken pipe', $error->getMessage()); -+ $this->assertEqualsIgnoringCase('Unable to write to stream: fwrite(): send of 3 bytes failed with errno=32 Broken pipe', $error->getMessage()); - } - - private function createWriteableLoopMock() |