Skip to content

Commit 6792099

Browse files
mikehaertlsamdark
authored andcommitted
Fixes #13689: Fixed handling of errors in closures
1 parent db0e7a6 commit 6792099

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

framework/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Yii Framework 2 Change Log
66

77
- 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)
88
- Enh #13226: `yii cache` command now warns about the fact that it's not able to flush APC cache from console (samdark)
9+
- Bug #13689: Fixed handling of errors in closures (mikehaertl)
910
- Bug #11719: Fixed `yii\db\Connection::$enableQueryCache` caused infinite loop when the same connection was used for `yii\caching\DbCache` (michaelarnauts)
1011
- Bug #10346: Fixed "DOMException: Invalid Character Error" in `yii\web\XmlResponseFormatter::buildXml()` (sasha-ch)
1112
- Bug #13694: `yii\widgets\Pjax` now sends `X-Pjax-Url` header with response to fix redirect (wleona3, Faryshta)

framework/web/ErrorHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function addTypeLinks($code)
191191
$url = null;
192192

193193
$shouldGenerateLink = true;
194-
if ($method !== null) {
194+
if ($method !== null && substr_compare($method, '{closure}', -9) !== 0) {
195195
$reflection = new \ReflectionMethod($class, $method);
196196
$shouldGenerateLink = $reflection->isPublic() || $reflection->isProtected();
197197
}

0 commit comments

Comments
 (0)