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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vike2000 at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Fri Nov 01 01:01:28 2024 UTC