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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 04:05:54 2022 UTC