|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-12 08:29 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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