#23826 [Opn]: ob_end_clean() returns error notice when buffer is empty
| From: | sniper@php.net | Date: | Tue, 27 May 2003 08:10:03 +0000 |
| Subject: | #23826 [Opn]: ob_end_clean() returns error notice when buffer is empty | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969353929@lists.php.net to get a copy of this message | ||
ID: 23826
Updated by: sniper@php.net
Reported By: jc at mega-bucks dot co dot jp
Status: Open
Bug Type: Documentation problem
Operating System: Red Hat Linux 8.0
PHP Version: 4.3.2RC4
New Comment:
You don't need to submit anymore bug reports..
And I meant with that crash preventing that it now throws
an error and returns false, reviously when it didn't check
the buffer, it just crashed. (that was the fix)
Previous Comments:
------------------------------------------------------------------------
[2003-05-27 02:23:47] jc at mega-bucks dot co dot jp
>The notice was added to prevent it from crashing with empty buffers
I must be missing something ... how does throwing a notice prevent
anything from crashing? Or do you mean there is absolutely no way to
check that the output buffer is empty *except* to call ob_end_clean()
and check to see if a notice was thrown or not?
If that's the case then ... ouch.
>Docs should mention this though.
That would be nice ;) Does re-categorizing it as a documentation
problem mean that someone will get around to it or should I submit a
new documentation bug report?
Thanks!
------------------------------------------------------------------------
[2003-05-27 02:17:44] sniper@php.net
The notice was added to prevent it from crashing with empty buffers.
Just use @ in front of it if it bothers you.
Docs should mention this though.
------------------------------------------------------------------------
[2003-05-27 01:21:14] jc at mega-bucks dot co dot jp
I get the following notice/error when calling ob_end_clean()
Notice: ob_end_clean(): failed to delete buffer. No buffer to delete.
#1 - why is it an error to call ob_end_clean() on an empty output
buffer?
#2 - Must one check before hand if the output buffer has any content,
if so the documentation should state this.
Thanks!
PS I am using PHP 4.3.2RC3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23826&edit=1