Re: Patch for bugs in errorhandling in PEAR 1.3
| From: | Stefan Neufeind | Date: | Wed, 03 Mar 2004 10:26:44 +0000 |
| Subject: | Re: Patch for bugs in errorhandling in PEAR 1.3 | ||
| References: | 1 | Groups: | php.pear.dev php.pear.qa |
| Request: | Send a blank email to pear-dev+get-26051@lists.php.net to get a copy of this message | ||
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
>
>