Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
Fix displaying anonymous classes on PHP >= 7.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 25, 2020
1 parent 1eff904 commit 8e36299
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Exception/FlattenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getMessage()
public function setMessage($message)
{
if (false !== strpos($message, "class@anonymous\0")) {
$message = preg_replace_callback('/class@anonymous\x00.*?\.php(?:0x?|:)[0-9a-fA-F]++/', function ($m) {
$message = preg_replace_callback('/class@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
return class_exists($m[0], false) ? get_parent_class($m[0]).'@anonymous' : $m[0];
}, $message);
}
Expand Down

0 comments on commit 8e36299

Please sign in to comment.