php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71638 [minor clarification] return value on fail of stream_filter_append()
Submitted: 2016-02-20 17:43 UTC Modified: 2016-02-21 12:49 UTC
From: vike2000 at gmail dot com Assigned: tpunt (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: MacOS 10.6.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 + 17 = ?
Subscribe to this entry?

 
 [2016-02-20 17:43 UTC] vike2000 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.stream-filter-append
---
Page should include that the function only returns a resource on success and returns false on error (still - regarding v5.2 change).

Regarding section "Return Values

Returns a resource which can be used to refer to this filter instance during a call to stream_filter_remove()."

(I'm trying to follow instructions around documentation user notes.)

Test script:
---------------
var_dump(stream_filter_append(fopen('/dev/null','rb'),'null'));
/*
Same for all my versions:
PHP 5.3.29 with Suhosin-Patch (cli) (built: Oct  3 2015 20:34:12) (DEBUG)
PHP 5.4.32 (cli) (built: Oct  3 2015 20:40:05) 
PHP 5.5.16 (cli) (built: Oct  3 2015 20:49:43) 
PHP 5.6.0 (cli) (built: Jan 10 2016 22:08:51) 
*/
// My real example was via mod_php v5.6 @ Apache v2.2 appending zlib.deflate to an https stream, giving E_WARNING: stream_filter_append(): Filter failed to process pre-buffered data

Expected result:
----------------
false or resource

Actual result:
--------------
false

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-21 12:48 UTC] tpunt@php.net
Automatic comment from SVN on behalf of tpunt
Revision: http://svn.php.net/viewvc/?view=revision&revision=338619
Log: Resolve doc bug #71638
 [2016-02-21 12:49 UTC] tpunt@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: tpunt
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC