Bug #64977 [Ana]: ob_start() fails when passed default parameters

From: Date: Thu, 26 Sep 2013 21:23:31 +0000
Subject: Bug #64977 [Ana]: ob_start() fails when passed default parameters
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10314@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64977&edit=1

 ID:                 64977
 Updated by:         aharvey@php.net
 Reported by:        rewilliams at newtekemail dot com
 Summary:            ob_start() fails when passed default parameters
 Status:             Analyzed
 Type:               Bug
 Package:            Documentation problem
 PHP Version:        5.5.0RC2
 Block user comment: N
 Private report:     N

 New Comment:

Mike, what happens if you pass true as the "flags" parameter in 5.4+? It looks 
easier to ask you than figure out the code paths, honestly, and we need to cover 
the BC story somehow.


Previous Comments:
------------------------------------------------------------------------
[2013-09-26 21:21:44] aharvey@php.net

Related To: Bug #62796

------------------------------------------------------------------------
[2013-09-26 14:48:17] mike@php.net

Related To: Bug #62796

------------------------------------------------------------------------
[2013-08-08 06:12:40] masakielastic at gmail dot com

The following page also should be updated.

http://www.php.net/manual/en/outcontrol.constants.php

There is no description for PHP_OUTPUT_HANDLER_CLEANABLE, 
PHP_OUTPUT_HANDLER_DISABLED, PHP_OUTPUT_HANDLER_FLUSHABLE, 
PHP_OUTPUT_HANDLER_REMOVABLE, PHP_OUTPUT_HANDLER_STARTED, 
PHP_OUTPUT_HANDLER_STDFLAGS.

The list of all constants added in PHP 5.4 is found in the following instruction 
page.
http://www.php.net/manual/en/migration54.global-constants.php

------------------------------------------------------------------------
[2013-08-06 06:39:55] mike@php.net

This is about correct. We missed to document the new flags parameter including 
available constants for 5.4+

So:
PHP_OUTPUT_HANDLER_REMOVABLE: whether ob_end_*() can be called
PHP_OUTPUT_HANDLER_CLEANABLE: whether ob_*_clean() can be called
PHP_OUTPUT_HANDLER_FLUSHABLE: whether ob_flush() can be called
PHP_OUTPUT_HANDLER_STDFLAGS: all above OR'ed together

On another note: the "del" status array element is never set in 5.4+, the flags 
entry will contain PHP_OUTPUT_HANDLER_REMOVABLE if it's deletable.

------------------------------------------------------------------------
[2013-08-06 03:15:38] kubo at iteman dot jp

> This is more like a documentation bug. There is a bunch of constants 
> undocumented http://lxr.php.net/xref/PHP_5_4/main/output.c#204
> . Also the 
third 
> ob_start() argument can be not only true/false, you can pass various flags 
> there. As such, if you change your first line

> ob_start(null, 0, PHP_OUTPUT_HANDLER_REMOVABLE)

> no warnings will be to see.

It works. But the "del" entry for ob_get_status() is never set with the default 
value or the built-in constants on PHP 5.4. The "del" entry is always set on PHP 
5.3.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=64977


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64977&edit=1


Thread (11 messages)

« previous php.doc.bugs (#10314) next »