Bug #73590 [Opn->Csd]: stream_filter_append error with fopen on an url
| From: | cmb@php.net | Date: | Wed, 23 Nov 2016 19:09:18 +0000 |
| Subject: | Bug #73590 [Opn->Csd]: stream_filter_append error with fopen on an url | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205580@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73590&edit=1
ID: 73590
Updated by: cmb@php.net
Reported by: marcimat at rezo dot net
Summary: stream_filter_append error with fopen on an url
-Status: Open
+Status: Closed
Type: Bug
Package: Streams related
Operating System: macOS Sierra 10.12.1
PHP Version: 7.0.13
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Fixed with <http://git.php.net/?p=php-src.git;a=commit;h=a8d031fb>.
Previous Comments:
------------------------------------------------------------------------
[2016-11-23 14:13:19] marcimat at rezo dot net
Description:
------------
When using a user created php_user_filter, attached to a url stream (with fopen), the error
"Warning: stream_filter_append(): Filter failed to process pre-buffered data in ..."
occured.
- There is/was no error in PHP 5.6.27.
- There is no error if fopen open a local file.
- There is no error with the integrated 'string.toupper' filter.
Test script:
---------------
Short :
// Example class strtoupper in http://php.net/manual/en/function.stream-filter-register.php#example-4575
stream_filter_register('strtoupper', 'strtoupper_filter');
$fp = fopen('http://localhost/test.txt',
'r');
stream_filter_append($fp, 'strtoupper', STREAM_FILTER_READ); # DOES NOT WORK
Complete example :
https://gist.github.com/anonymous/7b22c14390d3e831a8d472aad00baeee
Expected result:
----------------
No error (and the text print in uppercase)
Actual result:
--------------
No error in PHP 5.6
Error in PHP 7.0.12 (Warning: stream_filter_append(): Filter failed to process pre-buffered data in
xxx)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73590&edit=1