From 713615d8d52e3c3340692dc92ee55caec5ed97b5 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 19 Dec 2023 16:51:15 +1100 Subject: [PATCH] Revert changes to CompressedString::class, messages were going out base64 encoded and compressed --- app/Casts/CompressedString.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/Casts/CompressedString.php b/app/Casts/CompressedString.php index 29d0bd2..6089640 100644 --- a/app/Casts/CompressedString.php +++ b/app/Casts/CompressedString.php @@ -4,7 +4,6 @@ namespace App\Casts; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; -use Illuminate\Support\Arr; class CompressedString implements CastsAttributes { @@ -21,11 +20,6 @@ class CompressedString implements CastsAttributes */ public function get($model,string $key,mixed $value,array $attributes): string { - static $converted = []; - - if (Arr::get($converted,$key)) - return $value; - // For stream resources, we to fseek in case we've already read it. if (is_resource($value)) fseek($value,0); @@ -34,8 +28,6 @@ class CompressedString implements CastsAttributes ? stream_get_contents($value) : $value; - $converted[$key] = TRUE; - return $value ? zstd_uncompress(base64_decode($value)) : ''; }