|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-22 14:59 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ This is a problem in PHP 5.0.0b3 (distro), which wasn't an option in the bug report select list. Basically, upon upgrading to PHP5.0.0b3 our application generated runtime Reflection_Exceptions claiming to be unable to find the class specified by a class hint. E.g. when calling $params = $method->getParameters(); $hint = $params[0]->getClass(); Changing the class hint to lowercase fixes this problem. Reproduce code: --------------- class Foo { } class Bar { function demo(Foo $f) { // nothing } } $class = new Reflection_Class('Bar'); $methods = $class->getMethods(); $params = $methods[0]->getParameters(); $hint = $params[0]->getClass(); // reflection_exception was thrown print "Class expected is: ". $hint . "\n"; Expected result: ---------------- Class expected is: Foo Actual result: -------------- <b>Fatal error</b>: Uncaught exception 'reflection_exception' with message 'Class Foo does not exist' in ...