Bug #74224 [Opn]: output_add_rewrite_var always starts a new output buffer
| From: | cmb@php.net | Date: | Thu, 14 Sep 2017 17:59:53 +0000 |
| Subject: | Bug #74224 [Opn]: output_add_rewrite_var always starts a new output buffer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211165@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74224&edit=1
ID: 74224
Updated by: cmb@php.net
Reported by: bernd dot jaenichen at questback dot com
Summary: output_add_rewrite_var always starts a new output
buffer
Status: Open
Type: Bug
Package: Output Control
Operating System: openSUSE 13.2 (i586)
PHP Version: 5.6.30
Block user comment: N
Private report: N
New Comment:
According to <https://3v4l.org/oIpdo>, the behavior has
been
changed as of PHP 5.4.0 which may have been done deliberately, in
which case this would be a documentation problem.
Previous Comments:
------------------------------------------------------------------------
[2017-03-08 13:47:58] bernd dot jaenichen at questback dot com
Description:
------------
---
From manual page: http://www.php.net/function.output-add-rewrite-var
---
If ob_start() has already been called and output_add_rewrite_var() is called after that it leads to
ob_get_level() == 2.
Manual states that this should be the case only if no buffering is active.
Bug is reproducable in CLI as well as CGI mode.
Test script:
---------------
<?PHP
ob_start();
echo "Fill buffer\n";
output_add_rewrite_var('someParam', 1);
echo "Level: " . ob_get_level() . "\n";
echo ob_get_clean();
Expected result:
----------------
Fill buffer
Level: 1
Actual result:
--------------
Fill buffer
Level: 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74224&edit=1