Re: Patch for bugs in errorhandling in PEAR 1.3
| From: | Greg Beaver | Date: | Wed, 03 Mar 2004 13:47:31 +0000 |
| Subject: | Re: Patch for bugs in errorhandling in PEAR 1.3 | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-804@lists.php.net to get a copy of this message | ||
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