|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-11 13:28 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
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