#26695 [NEW]: Reflection API does not recognize mixed-case class hints

From: Date: Mon, 22 Dec 2003 18:52:15 +0000
Subject: #26695 [NEW]: Reflection API does not recognize mixed-case class hints
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52395@lists.php.net to get a copy of this message
From: hans at velum dot net Operating system: Linux, Windows PHP version: 5CVS-2003-12-22 (dev) PHP Bug Type: Class/Object related Bug description: Reflection API does not recognize mixed-case class hints 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 ... -- Edit bug report at http://bugs.php.net/?id=26695&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26695&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26695&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26695&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26695&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26695&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26695&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26695&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26695&r=support Expected behavior: http://bugs.php.net/fix.php?id=26695&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26695&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26695&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26695&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26695&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26695&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26695&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26695&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26695&r=float

« previous php.bugs (#52395) next »