Bug #55156 [Com]: ReflectionClass::getDocComment() returns comment even though the class has none

From: Date: Thu, 07 Jul 2011 10:50:21 +0000
Subject: Bug #55156 [Com]: ReflectionClass::getDocComment() returns comment even though the class has none
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55156&edit=1 ID: 55156 Comment by: schmittjoh at gmail dot com Reported by: schmittjoh at gmail dot com Summary: ReflectionClass::getDocComment() returns comment even though the class has none Status: Open Type: Bug Package: Reflection related Operating System: Ubuntu 10.04 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Note that this only happens if the class that ReflectionClass represents has no doc comment itself. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#161684) next »