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
@ -6,6 +6,7 @@ Yii Framework 2 Change Log
|
||||
|
||||
- Bug #13848: `yii\di\Instance::ensure()` wasn't throwing an exception when `$type` is specified and `$reference` object isn't instance of `$type` (c-jonua)
|
||||
- Enh #13226: `yii cache` command now warns about the fact that it's not able to flush APC cache from console (samdark)
|
||||
- Bug #13689: Fixed handling of errors in closures (mikehaertl)
|
||||
- Bug #11719: Fixed `yii\db\Connection::$enableQueryCache` caused infinite loop when the same connection was used for `yii\caching\DbCache` (michaelarnauts)
|
||||
- Bug #10346: Fixed "DOMException: Invalid Character Error" in `yii\web\XmlResponseFormatter::buildXml()` (sasha-ch)
|
||||
- Bug #13694: `yii\widgets\Pjax` now sends `X-Pjax-Url` header with response to fix redirect (wleona3, Faryshta)
|
||||
|
@ -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