Edit report at https://bugs.php.net/bug.php?id=55156&edit=1

 ID:                 55156
 Updated by:         fel...@php.net
 Reported by:        schmittjoh at gmail dot com
 Summary:            ReflectionClass::getDocComment() returns comment
                     even though the class has none
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Reflection related
 Operating System:   Ubuntu 10.04
 PHP Version:        5.3.6
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-07-07 06:50:20] schmittjoh at gmail dot com

Note that this only happens if the class that ReflectionClass represents has no 
doc comment itself.

------------------------------------------------------------------------
[2011-07-07 06:46:11] schmittjoh at gmail dot com

Description:
------------
In some cases, the ReflectionClass::getDocComment() method returns a doc 
comment that belongs to another class than the one the ReflectionClass 
represents.

I haven't been able to reproduce in a isolated script, but instead I have added 
a failing unit test to Doctrine's unit test suite, see 
https://github.com/schmittjoh/common/commit/2d77264758ddd9658791b4284a9492a38bb1b049

You can run this test, by performing the following steps:

git clone http://github.com/schmittjoh/common.git
cd common
git checkout strangePhpError
phpunit

Test script:
---------------
see above



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55156&edit=1

Reply via email to