When decompressing compressed messages, dont barf if we try to decompress the same attribute twice
This commit is contained in:
parent
3aa1c826bd
commit
d036c7e704
@ -28,7 +28,13 @@ class CompressedString implements CastsAttributes
|
|||||||
? stream_get_contents($value)
|
? stream_get_contents($value)
|
||||||
: $value;
|
: $value;
|
||||||
|
|
||||||
|
// If we get an error decompressing, it might not be zstd (or its already been done)
|
||||||
|
try {
|
||||||
return $value ? zstd_uncompress(base64_decode($value)) : '';
|
return $value ? zstd_uncompress(base64_decode($value)) : '';
|
||||||
|
|
||||||
|
} catch (\ErrorException $e) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user