- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)

This commit is contained in:
Felipe Pena 2011-07-07 23:07:14 +00:00
parent 774e127a00
commit 1cf3ec5eab
2 changed files with 34 additions and 0 deletions

4
NEWS
View File

@ -1,6 +1,10 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2011, PHP 5.3.7
- Zend Engine:
. Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
though the class has none). (Felipe)
- Core
. Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)
(Ralph Schindler, Dmitry)

30
Zend/tests/bug55156.phpt Normal file
View File

@ -0,0 +1,30 @@
--TEST--
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
--FILE--
<?php
/** test */
namespace foo {
function test() { }
$x = new \ReflectionFunction('foo\test');
var_dump($x->getDocComment());
/** test1 */
class bar { }
/** test2 */
class foo extends namespace\bar { }
$x = new \ReflectionClass('foo\bar');
var_dump($x->getDocComment());
$x = new \ReflectionClass('foo\foo');
var_dump($x->getDocComment());
}
?>
--EXPECTF--
bool(false)
string(12) "/** test1 */"
string(12) "/** test2 */"