Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust pretty name of closures on PHP 8.4 #20165

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/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 framework/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
Loading