Skip to content

Commit

Permalink
Fix #20165: Adjust pretty name of closures for PHP 8.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 27, 2024
1 parent 4dc1794 commit 01943ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Yii Framework 2 Change Log
- Enh #20134: Raise minimum `PHP` version to `7.3` (@terabytesoftw)
- Bug #20141: Update `ezyang/htmlpurifier` dependency to version `4.17` (@terabytesoftw)
- Bug #19817: Add MySQL Query `addCheck()` and `dropCheck()` (@bobonov)
- Bug #20165: Adjust pretty name of closures for PHP 8.4 compatibility (@staabm)

2.0.49.2 October 12, 2023
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion web/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function addTypeLinks($code)
$url = null;

$shouldGenerateLink = true;
if ($method !== null && substr_compare($method, '{closure}', -9) !== 0) {
if ($method !== null && strpos($method, '{closure') === false) {
$reflection = new \ReflectionClass($class);
if ($reflection->hasMethod($method)) {
$reflectionMethod = $reflection->getMethod($method);
Expand Down

0 comments on commit 01943ba

Please sign in to comment.