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

From: Date: Fri, 27 Sep 2013 08:05:06 +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-10317@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: mike@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: Duh, unfortunately pretty much the opposite: bool(true) -> int(1) & ~0xf == 0 The first bits are reserved for the OB handler type (internal/user) and thus ignored, so flags end up as zero, which in turn means the handler is neither removeable, nor flushable, nor cleanable. I suspect, I could have done better. Previous Comments: ------------------------------------------------------------------------ [2013-09-26 21:23:31] aharvey@php.net 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. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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

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