#47019 [NEW]: \ReflectionParameter->getClass()->getName() is broken.
| From: | daniel dot gorski at develnet dot org | Date: | Tue, 06 Jan 2009 11:49:57 +0000 |
| Subject: | #47019 [NEW]: \ReflectionParameter->getClass()->getName() is broken. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-132586@lists.php.net to get a copy of this message | ||
From: daniel dot gorski at develnet dot org
Operating system: Linux
PHP version: 5.3CVS-2009-01-06 (CVS)
PHP Bug Type: Class/Object related
Bug description: \ReflectionParameter->getClass()->getName() is broken.
Description:
------------
The \ReflectionParameter->getClass()->getName() method returns a wrong
value. It omits the leading namespace slash.
Reproduce code:
---------------
namespace A\B\C;
class Bar {}
namespace D;
class Foo { function foo(\A\B\C\Bar $x) {} }
$rm = new \ReflectionMethod('\D\Foo', 'foo');
$rp = $rm->getParameters();
echo $rp[0]->getClass()->getName();
Expected result:
----------------
\A\B\C\Bar
Actual result:
--------------
A\B\C\Bar
--
Edit bug report at http://bugs.php.net/?id=47019&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47019&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47019&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47019&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47019&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47019&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47019&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47019&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47019&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47019&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47019&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47019&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47019&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47019&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47019&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47019&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47019&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47019&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47019&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47019&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47019&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47019&r=mysqlcfg