php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41962 Incorrect error message
Submitted: 2007-07-11 13:14 UTC Modified: 2007-07-11 13:28 UTC
From: zoe at uk dot ibm dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5CVS-2007-07-11 (CVS) OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zoe at uk dot ibm dot com
New email:
PHP Version: OS:

 

 [2007-07-11 13:14 UTC] zoe at uk dot ibm dot com
Description:
------------
This is a minor mistake in an error message in reflectionClass.
When isSubClassOf() is given a non-existent class (X)  as a parameter the resulting fatal error says "Interface X does not exist". This should read "Class X does not exist".

Reproduce code:
---------------
--TEST--
ReflectionClass::isSubclassOf() - non-existent class error
--FILE--
<?php
class A {}
$rc = new ReflectionClass('A');

var_dump($rc->isSubclassOf('X'));

?>
--EXPECTF--
Fatal error: Uncaught exception 'ReflectionException' with message 'Class X does not exist' in %s:5
Stack trace:
#0 %s(5): ReflectionClass->isSubclassOf('X')
#1 {main}
  thrown in %s on line 5


Expected result:
----------------
See EXPECT section above

Actual result:
--------------
Fatal error: Uncaught exception 'ReflectionException' with message 'Interface X does not exist' in %s:5

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-11 13:28 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 07:01:27 2025 UTC