Oh by all means, kill the warning. The behavior is sound though (the fix for the issue reported in #53727 where a missing parent *ce would affect the is_a_impl()'s ability to correctly determine it's subtype.

The question is, should we keep the warning in 5.4? I'd say no, I think false should suffice b/c it answers the question correctly: "Is NonExistentClass a subclass of SomeOtherClass": no. In that case, there's no real need for a warning.

Patch for 5.3 attached, and should probably be applied to trunk and 5.4 as well if you think that is the right idea.

-ralph

On 7/7/11 4:08 PM, Johannes Schlüter wrote:
On Thu, 2011-07-07 at 20:27 +0200, Pierre Joye wrote:
what kind of troubles do they see?

https://pear.php.net/bugs/bug.php?id=18656

Even if the Warning is good it's questionable for 5.3, especially during
RC.
(note that warnings not only cause the error being reported, which can
be switched off and fill logfiles but also triggers error handlers which
won't expect this ...)

johannes

2011/7/7 Johannes Schlüter<johan...@schlueters.de>:
Hi,

I was told (didn't verify) that this causes lots of trouble with PEAR
and other applications. We're in final RC phase of 5.3.7. I don't think
it is critical for 5.3.7 and I wonder whether we need it for 5.3 at all.

johannes

On Mon, 2011-07-04 at 14:55 +0000, Dmitry Stogov wrote:
dmitry                                   Mon, 04 Jul 2011 14:55:39 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312904

Log:
Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)

Bug: https://bugs.php.net/53727 (Assigned) Inconsistent behavior of 
is_subclass_of with interfaces

Changed paths:
     U   php/php-src/branches/PHP_5_3/NEWS
     A   php/php-src/branches/PHP_5_3/Zend/tests/bug53727.phpt
     U   php/php-src/branches/PHP_5_3/Zend/tests/is_a.phpt
     U   php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
     U   
php/php-src/branches/PHP_5_3/ext/standard/tests/class_object/is_a_variation_001.phpt
     A   php/php-src/branches/PHP_5_4/Zend/tests/bug53727.phpt
     U   php/php-src/branches/PHP_5_4/Zend/tests/is_a.phpt
     U   php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c
     U   
php/php-src/branches/PHP_5_4/ext/standard/tests/class_object/is_a_variation_001.phpt
     A   php/php-src/trunk/Zend/tests/bug53727.phpt
     U   php/php-src/trunk/Zend/tests/is_a.phpt
     U   php/php-src/trunk/Zend/zend_builtin_functions.c
     U   
php/php-src/trunk/ext/standard/tests/class_object/is_a_variation_001.phpt

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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









diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index d027609..60256b3 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -825,7 +825,6 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, 
zend_bool only_subclass)
        if (Z_TYPE_P(obj) == IS_STRING) {
                zend_class_entry **the_ce;
                if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce 
TSRMLS_CC) == FAILURE) {
-                       zend_error(E_WARNING, "Unknown class passed as 
parameter");
                        RETURN_FALSE;
                }
                instance_ce = *the_ce;
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to