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 ---------------------------------------------------------------------
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php