php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #46898 Suggestion to improve docs for unerasable output buffers
Submitted: 2008-12-18 12:34 UTC Modified: 2009-11-20 11:17 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: robin_fernandes at uk dot ibm dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2008-12-18 12:34 UTC] robin_fernandes at uk dot ibm dot com
Description:
------------
It is possible to create an unerasable output buffer by setting the flag $erase=false when calling ob_start().

This flag is documented, but its impact on other output buffering functions is not very clear.

I propose adding a sentence to the doc of each of the affected functions as follows:

ob_clean():
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not cleaned.


ob_end_clean():
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not cleaned and is not destroyed.


ob_end_flush():
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not flushed and is not destroyed.


ob_get_clean():
PHP5:
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not cleaned.
PHP6:
If the buffer is unerasable, the contents of the buffer is returned, but a notice is raised and the buffer is not cleaned.


ob_get_flush():
PHP5:
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not flushed.
PHP6:
If the buffer is unerasable, the contents of the buffer is returned, but a notice is raised and the buffer is not flushed.


And the following will be true once bug 46897 is fixed (currently, the behaviour is inconsistent):
ob_flush():
If the buffer is unerasable, a notice is raised and the function returns false; the buffer is not flushed.


Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
n/a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-20 11:17 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2009-11-20 11:18 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=291066
Log: Erase affects other functions (bug #46898)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 03:00:02 2026 UTC