Fixes #13689: Fixed handling of errors in closures

This commit is contained in:
Michael Härtl
2017-03-21 18:23:27 +01:00
committed by Alexander Makarov
parent db0e7a6c8f
commit 6792099bcc
2 changed files with 2 additions and 1 deletions

View File

@ -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();
}