Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb0d476

Browse files
committed
fix detecting anonymous exception classes on Windows and PHP 7
1 parent 108d436 commit fb0d476

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ protected function doRenderThrowable(\Throwable $e, OutputInterface $output): vo
858858
}
859859

860860
if (str_contains($message, "@anonymous\0")) {
861-
$message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
861+
$message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', function ($m) {
862862
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
863863
}, $message);
864864
}

0 commit comments

Comments
 (0)