> 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?

for the record, this is what happened:
1, https://bugs.php.net/bug.php?id=53727 got reported
2, dimitry commited http://svn.php.net/viewvc/?view=revision&revision=312904
3, that commit broke Pear, as is_a() started throwing a warning, if
non-object is passed as first argument
https://pear.php.net/bugs/bug.php?id=18656
4, Johannes brought that issue up on the mailing list:
http://www.mail-archive.com/internals@lists.php.net/msg51868.html and
in the end the the accepted solution was to remove the warning.
5, Helgi fixed Pear in the meanwhile
http://svn.php.net/viewvc/pear/pear-core/tags/PEAR-1.9.5/PEAR.php?r1=313081&r2=313083&pathrev=313340
6, Stas removes the warning
http://svn.php.net/viewvc?view=revision&revision=313162 Dmitry
adds some tests
http://svn.php.net/viewvc/?view=revision&revision=313271
7, Helgi reverts the Pear fix
http://svn.php.net/viewvc/pear/pear-core/tags/PEAR-1.9.5/PEAR.php?r1=313340&r2=313339&pathrev=313340
8, nobody notices the meaning of this change:
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c?r1=312904&r2=312903&pathrev=312904#l848
which AFAIK means that the zend_lookup_class (and hence autoloading)
will always be called if the first argument is a string for is_a.
previously it would only happen for is_subclass_of()

Tyrael

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to