mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #13689: Fixed handling of errors in closures
This commit is contained in:

committed by
Alexander Makarov

parent
db0e7a6c8f
commit
6792099bcc
@ -191,7 +191,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
|
||||
$url = null;
|
||||
|
||||
$shouldGenerateLink = true;
|
||||
if ($method !== null) {
|
||||
if ($method !== null && substr_compare($method, '{closure}', -9) !== 0) {
|
||||
$reflection = new \ReflectionMethod($class, $method);
|
||||
$shouldGenerateLink = $reflection->isPublic() || $reflection->isProtected();
|
||||
}
|
||||
|
Reference in New Issue
Block a user