This commit is contained in:
1 parent
f7c532a648
commit
640bd67556
5801 files changed
+484532
-55857
No files matched your search
@@ -94,7 +94,7 @@ class FlattenException
|
||||
if (!$cloner ??= $defaultCloner) {
|
||||
$cloner = $defaultCloner = new VarCloner();
|
||||
$cloner->addCasters([
|
||||
\Throwable::class => function (\Throwable $e, array $a, Stub $s, bool $isNested): array {
|
||||
\Throwable::class => static function (\Throwable $e, array $a, Stub $s, bool $isNested): array {
|
||||
if (!$isNested) {
|
||||
unset($a[Caster::PREFIX_PROTECTED.'message']);
|
||||
unset($a[Caster::PREFIX_PROTECTED.'code']);
|
||||
@@ -228,7 +228,7 @@ class FlattenException
|
||||
public function setMessage(string $message): static
|
||||
{
|
||||
if (str_contains($message, "@anonymous\0")) {
|
||||
$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]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message);
|
||||
$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]++/', static fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message);
|
||||
}
|
||||
|
||||
$this->message = $message;
|
||||
|
||||
Reference in new issue
Block a user