php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54639 output_add_rewrite_var can only be used once
Submitted: 2011-04-30 12:30 UTC Modified: 2020-08-13 10:09 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: fl at nyggen dot com Assigned: cmb (profile)
Status: Closed Package: Output Control
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fl at nyggen dot com
New email:
PHP Version: OS:

 

 [2011-04-30 12:30 UTC] fl at nyggen dot com
Description:
------------
The output_add_rewrite_var can only be used once, the second time it fails.

More on this problem here: http://stackoverflow.com/questions/5822936/output-add-
rewrite-var-problems

Test script:
---------------
// outer buffer
ob_start();

print_r(ob_list_handlers());

// inner buffer 1
ob_start();
output_add_rewrite_var('var', 'value');
print_r(ob_list_handlers());
ob_end_flush();

print_r(ob_list_handlers());

// inner buffer 2
ob_start();
output_add_rewrite_var('var', 'value');
print_r(ob_list_handlers());
ob_end_flush();

print_r(ob_list_handlers());

Expected result:
----------------
Output should have been:

Array
(
    [0] => default output handler
)
Array
(
    [0] => default output handler
    [1] => URL-Rewriter
)
Array
(
    [0] => default output handler
)
Array
(
    [0] => default output handler
    [1] => URL-Rewriter
)
Array
(
    [0] => default output handler
)

Actual result:
--------------
Output is:

Array
(
    [0] => default output handler
)
Array
(
    [0] => default output handler
    [1] => URL-Rewriter
)
Array
(
    [0] => default output handler
)
Array
(
    [0] => default output handler
    [1] => default output handler
)
Array
(
    [0] => default output handler
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-26 15:07 UTC] mike@php.net
-Type: Bug +Type: Documentation Problem
 [2013-09-26 15:07 UTC] mike@php.net
Yes, this odd output handler can only be used once.
 [2018-12-30 16:40 UTC] girgias@php.net
-Package: *General Issues +Package: Output Control -PHP Version: 5.3SVN-2011-04-30 (snap) +PHP Version: Irrelevant
 [2020-08-13 10:09 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-08-13 10:10 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=c6a8e42bdbbb814124b84d45d95cd793129aac6b
Log: Fix #54639: output_add_rewrite_var can only be used once
 [2020-08-13 10:10 UTC] phpdocbot@php.net
-Status: Assigned +Status: Closed
 [2020-08-14 02:05 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=a3e9a4f574f5a4fc7f5ebc44a3060ce9f5054e8b
Log: Fix #54639: output_add_rewrite_var can only be used once
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=a88b386908d6d7778a49ba38f5f5fef06f520233
Log: Fix #54639: output_add_rewrite_var can only be used once
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC