octicon-rss(16/)
You've already forked yii2
mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 02:13:17 +08:00
Fixed special case about reflection introduced by #16528
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
octicon-diff(16/tw-mr-1) 1 changed files with 1 additions and 1 deletions
@@ -523,7 +523,7 @@ class Container extends Component
|
|||||||
{
|
{
|
||||||
if (is_array($callback)) {
|
if (is_array($callback)) {
|
||||||
$reflection = new \ReflectionMethod($callback[0], $callback[1]);
|
$reflection = new \ReflectionMethod($callback[0], $callback[1]);
|
||||||
} elseif (is_object($callback)) {
|
} elseif (is_object($callback) && !$callback instanceof \Closure) {
|
||||||
$reflection = new \ReflectionMethod($callback, '__invoke');
|
$reflection = new \ReflectionMethod($callback, '__invoke');
|
||||||
} else {
|
} else {
|
||||||
$reflection = new \ReflectionFunction($callback);
|
$reflection = new \ReflectionFunction($callback);
|
||||||
|
|||||||
Reference in New Issue
Block a user