Bug #74224 [NEW]: output_add_rewrite_var always starts a new output buffer
| From: | bernd dot jaenichen at questback dot com | Date: | Wed, 08 Mar 2017 13:48:04 +0000 |
| Subject: | Bug #74224 [NEW]: output_add_rewrite_var always starts a new output buffer | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-207746@lists.php.net to get a copy of this message | ||
From: bernd dot jaenichen at questback dot com
Operating system: openSUSE 13.2 (i586)
PHP version: 5.6.30
Package: Output Control
Bug Type: Bug
Bug description:output_add_rewrite_var always starts a new output buffer
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 bug report at https://bugs.php.net/bug.php?id=74224&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74224&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74224&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74224&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74224&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74224&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74224&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74224&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74224&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74224&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74224&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74224&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74224&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74224&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74224&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74224&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74224&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74224&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74224&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74224&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74224&r=mysqlcfg