Bug #67068 [Opn->Csd]: getClosure returns somethings that's not a closure
| From: | stas@php.net | Date: | Sun, 01 Feb 2015 07:20:50 +0000 |
| Subject: | Bug #67068 [Opn->Csd]: getClosure returns somethings that's not a closure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190382@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67068&edit=1
ID: 67068
Updated by: stas@php.net
Reported by: knight at kopernet dot org
Summary: getClosure returns somethings that's not a closure
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: Windows
PHP Version: 5.4.27
-Assigned To:
+Assigned To: stas
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
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:
------------------------------------------------------------------------
[2014-04-13 22:23:38] knight at kopernet dot org
Description:
------------
When you try to reflect a closure that was created using ReflectionFunction/Method::getClosure() the
reflection objects doesn't say it's a closure.
Test script:
---------------
<?php
class MyClass {
public function method() {}
}
$object = new MyClass;
$reflector = new \ReflectionMethod($object, 'method');
$closure = $reflector->getClosure($object);
$closureReflector = new \ReflectionFunction($closure);
//expected bool(true) - got false
var_dump($closureReflector->isClosure());
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67068&edit=1