Doc #66758 [Opn]: Flags and control output buffering functions
| From: | krzysiekpiasecki at yahoo dot com | Date: | Sun, 23 Feb 2014 22:46:36 +0000 |
| Subject: | Doc #66758 [Opn]: Flags and control output buffering functions | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11008@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66758&edit=1
ID: 66758
User updated by: krzysiekpiasecki at yahoo dot com
Reported by: krzysiekpiasecki at yahoo dot com
Summary: Flags and control output buffering functions
Status: Open
Type: Documentation Problem
Package: Output Control
Operating System: MAC OS X 10.8.5
-PHP Version: Irrelevant
+PHP Version: 5.5.8
Block user comment: N
Private report: N
New Comment:
Version is 5.5.8
Previous Comments:
------------------------------------------------------------------------
[2014-02-23 22:43:42] krzysiekpiasecki at yahoo dot com
Description:
------------
From PHP manual: PHP_OUTPUT_HANDLER_CLEANABLE const control access to functions: ob_clean(),
ob_end_clean(), and ob_get_clean().
Using ob_end_clean(), there is a notice: "ob_end_clean(): failed to discard buffer of default
output handler (1)".
Using ob_get_clean(), there is even a double notice: "ob_get_clean(): failed to delete buffer
of default output handler (1)".
I understand, that only cleanable buffer can't be flush and delete. So why in manual these
functions are under control PHP_OUTPUT_HANDLER_CLEANABLE const? I'm confused.
Test script:
---------------
ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE);
ob_end_clean();
ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE);
ob_get_clean();
Expected result:
----------------
No notice, and no buffer after function invocation.
Actual result:
--------------
ob_end_clean() produces notice:
Notice: ob_end_clean(): failed to discard buffer of default output handler (1)
ob_get_clean() produces double notice:
Notice: ob_get_clean(): failed to discard buffer of default output handler (2)
Notice: ob_get_clean(): failed to discard buffer of default output handler (2)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66758&edit=1