Bug->Doc #54639 [Opn]: output_add_rewrite_var can only be used once

From: Date: Thu, 26 Sep 2013 15:07:06 +0000
Subject: Bug->Doc #54639 [Opn]: output_add_rewrite_var can only be used once
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10312@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54639&edit=1

 ID:                 54639
 Updated by:         mike@php.net
 Reported by:        fl at nyggen dot com
 Summary:            output_add_rewrite_var can only be used once
 Status:             Open
-Type:               Bug
+Type:               Documentation Problem
 Package:            *General Issues
 PHP Version:        5.3SVN-2011-04-30 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

Yes, this odd output handler can only be used once.


Previous Comments:
------------------------------------------------------------------------
[2011-04-30 12:30:17] 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
)


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



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


Thread (2 messages)

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