Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8389 invoked by uid 1010); 5 Mar 2005 19:33:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8374 invoked by uid 1007); 5 Mar 2005 19:33:41 -0000 To: internals@lists.php.net Message-ID: <422A09BB.7080409@dtlink.com> Date: Sat, 05 Mar 2005 14:34:19 -0500 Organization: DTLink, LLC User-Agent: Mozilla Thunderbird 1.0 (X11/20050124) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: yml@yml.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 207.192.181.138 Subject: PHP 5.0.3 losing $this From: yml@dtlink.com (Yermo Lamers) PHP 5.0.3 is losing $this. PHP 4.3.10 and 5.0.0 seem to work fine. The bug originally appeared in 5.0.2. I have submitted a bug report at: http://bugs.php.net/31525 I've not had alot of luck with reporting bugs through the bug tracker; For instance see http://bugs.php.net/31508 where the guy claims PHP can't do recursion without crashing ... Ummm? So I thought I'd try to ask here. Unfortunately I've been unable to reproduce the 5.0.3 bug in just a few lines. I do have a script that's in my mind pretty short and the meat of it is only 8 lines long but it includes three classes needed to set up the experiment. More information is available at: http://www.formvista.com/index.html?article_id=4 Direct link to the code: http://www.formvista.com/uploaded_files/php5_drops_object.php.txt Scroll to the bottom. The code has three classes: fv_basecomponent is a child of fv_basewidget is a child of fv_tree. fv_baseComponent overrides a method in fv_basewidget called &getParentControl(). fv_baseComponent::getParentControl() returns a reference to $this. In PHP 5.0.3 the reference returned is not an object and a nasty error is generated. I've tested this using today's snapshot (php5-STABLE-200503051730). It continues to work like a champ in PHP 4.3.10 and every previous version and like I said it used to work in 5.0.0. Any help in tracking this down or devising a workaround would be greatly appreciated. And if anyone has any thoughts on bug http://bugs.php.net/31508 that would be greatly appreciated as well; it's not quite the showstopper than the 5.0.3 bug is, but is causing me serious headaches as well. Thanks -- Yermo --------------------------------------------------------------------- DTLink Software http://www.dtlink.com Internet Business Systems and Software ---------------------------------------------------------------------