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

 ID:                 55156
 Comment by:         karsten at typo3 dot org
 Reported by:        schmittjoh at gmail dot com
 Summary:            ReflectionClass::getDocComment() returns comment
                     even though the class has none
 Status:             Closed
 Type:               Bug
 Package:            Reflection related
 Operating System:   Ubuntu 10.04
 PHP Version:        5.3.6
 Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

I have seen this running PHP 5.3.8, so it seems the fix wasn't complete... I'll 
check with the test mentioned above.


Previous Comments:
------------------------------------------------------------------------
[2011-08-22 01:11:15] pierr...@php.net

Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&revision=315259
Log: - Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even 
though the class has none)
# Patch was not committed on the PHP5.3 branch

------------------------------------------------------------------------
[2011-07-07 19:07:13] fel...@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=313056
Log: - Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even 
though the class has none)

------------------------------------------------------------------------
[2011-07-07 19:07:01] fel...@php.net

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.



------------------------------------------------------------------------
[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