ID: 40104 Updated by: [EMAIL PROTECTED] Reported By: denis at mesoconcepts dot com -Status: Open +Status: Bogus Bug Type: Output Control Operating System: all (php related) PHP Version: 5.2.0 New Comment:
This is the way it works since 5.1.x and we're not going to change it again. Previous Comments: ------------------------------------------------------------------------ [2007-01-11 22:42:03] denis at mesoconcepts dot com Description: ------------ Starting with php 5.2, objects are destroyed before output buffer handlers are called. Reproduce code: --------------- class foo { function bar() { } } $GLOBALS['fb'] =& new foo; function foo_bar($buffer) { $GLOBALS['fb']->bar(); return $buffer; } ob_start('foo_bar'); Expected result: ---------------- The code should not spit an error due to the $fb object not being initialized, as was the case prior to php 5.2. Actual result: -------------- PHP Fatal error: Call to a member function bar() on a non-object ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40104&edit=1