Browse Source

Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the

class itself).
PECL_OPENSSL
Ilia Alshanetsky 20 years ago
parent
commit
bd581ab476
  1. 4
      NEWS
  2. 3
      ext/reflection/php_reflection.c
  3. 13
      ext/reflection/tests/bug38194.phpt

4
NEWS

@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Aug 2006, PHP 5.2.0RC2
- Fixed bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the class
itself). (Ilia)
24 Jul 2006, PHP 5.2.0RC1
- Updated bundled MySQL client library to version 5.0.22 in the Windows
@ -204,7 +206,7 @@ PHP NEWS
- Fixed bug #37313 (sigemptyset() used without including <signal.h>).
(jdolecek)
- Fixed bug #37306 (max_execution_time = max_input_time). (Dmitry)
- Fixed Bug #37278 (SOAP not respecting uri in __soapCall). (Dmitry)
- Fixed bug #37278 (SOAP not respecting uri in __soapCall). (Dmitry)
- Fixed bug #37256 (php-fastcgi doesn't handle connection abort). (Dmitry)
- Fixed bug #37244 (Added strict flag to base64_decode() that enforces
RFC3548 compliance). (Ilia)

3
ext/reflection/php_reflection.c

@ -3536,8 +3536,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
return;
}
RETURN_BOOL(instanceof_function(ce, class_ce TSRMLS_CC));
RETURN_BOOL((ce != class_ce && instanceof_function(ce, class_ce TSRMLS_CC)));
}
/* }}} */

13
ext/reflection/tests/bug38194.phpt

@ -0,0 +1,13 @@
--TEST--
Reflection Bug #38194 (ReflectionClass::isSubclassOf() returns TRUE for the class itself)
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
class Object { }
$objectClass= new ReflectionClass('Object');
var_dump($objectClass->isSubclassOf($objectClass));
?>
--EXPECT--
bool(false)
Loading…
Cancel
Save