php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17952 is_a returns false if class is a superclass of the object.
Submitted: 2002-06-24 14:00 UTC Modified: 2002-09-11 11:25 UTC
From: sven at devcon dot net Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.2.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
3 - 1 = ?
Subscribe to this entry?

 
 [2002-06-24 14:00 UTC] sven at devcon dot net
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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 12:05 UTC] sven at devcon dot net
I can give a copy of the commercial application where this happens to the php-developer who wants to fix this bug.

Best regards,
sven
 [2002-07-03 20:25 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 13:01:29 2024 UTC