ID:               26695
 Updated by:       [EMAIL PROTECTED]
 Reported By:      hans at velum dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Class/Object related
 Operating System: *
 PHP Version:      5.0.0b3
 Assigned To:      helly
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2003-12-22 13:52:14] hans at velum dot net

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 this bug report at http://bugs.php.net/?id=26695&edit=1

Reply via email to