Bug #17952: is_a returns false if class is a superclass of the object.
| From: | sven at devcon dot net | Date: | Mon, 24 Jun 2002 18:00:06 +0000 |
| Subject: | Bug #17952: is_a returns false if class is a superclass of the object. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11951@lists.php.net to get a copy of this message | ||
From: sven@devcon.net
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: Class/Object related
Bug description: is_a returns false if class is a superclass of the object.
is_a() behaves like
return get_class($object) == strtolower($class);
but should behave like
return get_class($object) == strtolower($class) ||
is_subclass_of($object, $class);
--
Edit bug report at http://bugs.php.net/?id=17952&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17952&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17952&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17952&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17952&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17952&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17952&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17952&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17952&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17952&r=globals