Re: PHP 5.3.8 Released!

From: Date: Wed, 24 Aug 2011 20:45:21 +0000
Subject: Re: PHP 5.3.8 Released!
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Stas Malyshev wrote:
mmh.. how much breakage did you want. PEAR::isError is basically is_a($input, 'PEAR_Error'); it's been like that for> 8 years....
So, PEAR has a bug, if it passes non-object argument to is_a, as previously is_a was only documented (and actually still is) as accepting objects. The fact that this bug remained for 8 years is very sad, but it doesn't cease to be a bug.
If I am reading things right, is_a was only designed to handle an object, so feeding it a mixed parameter in isError was always wrong? As far as I can see, on the whole, the PEAR code only ever feeds an object and feeding it a string would have to be a real error? So there are a number of actions here all of which are potentially wrong, and PEAR should return an error if $input is not a valid object rather than relying on undocumented actions simply to fail? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php

Thread (54 messages)

« previous php.internals (#54891) next »