RE: [PEAR-QA] Re: [PEAR-DEV] Patch for bugs in errorhandling in P EAR 1.3

From: Date: Wed, 03 Mar 2004 14:03:40 +0000
Subject: RE: [PEAR-QA] Re: [PEAR-DEV] Patch for bugs in errorhandling in P EAR 1.3
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-807@lists.php.net to get a copy of this message
I'd like to point out that in PHP5 static methods can only be called using the class syntax (CLASS:method() )and cannot be called using object syntax ($object->method). isset($this) no longer has any meaning. As Greg has suggested, all PEAR methods using isset($this) need to be split into two methods once PHP5 is deployed. May as well do it now. BTW, there is a long thread on this topic on the internals mailing list. -----Original Message----- From: Greg Beaver [mailto:greg@chiaraquartet.net] Sent: Wednesday, March 03, 2004 7:48 AM To: Stefan Neufeind Cc: Markus Kalkbrenner; pear-qa@lists.php.net; Lukas Smith; Greg Beaver; Pierre Subject: [PEAR-QA] Re: [PEAR-DEV] Patch for bugs in errorhandling in PEAR 1.3 Hi all, I don't like this solution, it is by definition a hack, as it doesn't work with 4.2, and since PEAR supports 4.2, I am against it. The solution that I feel must be implemented is instead to add new static-only methods like PEAR::setGlobalErrorHandling(). If there is no significant opposition, I'll implement these in the next few weeks Greg Stefan Neufeind wrote: > Thank you Markus, > > I'm forwarding this again to the PEAR QA team (pear- > qa@lists.php.net), since I agree with you this is quite a grave > problem. We'll follow it ... thank you > > Stefan > > On 3 Mar 2004 at 11:30, Markus Kalkbrenner wrote: > > >>Hi! >> >>Due to the fact that nobody replied to my last mail, I'll try it >>twice. >> >>The errorhandling of PEAR contains some bugs regarding how to detect >>if a method is called staticly or not. In PEAR 1.3 the check for >>isset($this) in methods like setErrorHandling() was replaced by >>isset($this) && is_a($this, 'PEAR') >> >>I already pointed out that this solution isn't safe, too. I attached a >>file called reproduce.php. The expected output is: first try: I'm >>dead! >> >>But you'll see: >>first try: He's still alive! >>second try: I'm dead! >> >>After applying the patch for PEAR.php of PEAR 1.3 I attached >>(patch_for_PEAR_1_3.txt) you'll get the expected output! >> >>Note: >>The patch only works for PHP 4.3. PHP versions before 4.3 aren't >>affected and the behaviour is the same as before. >> >>I hope to get some feedback this time. >> >>Regards >>Markus >> >> -- PEAR QA Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.qa (#807) next »