From aec715fbfd3ee42705c2bc7ebfdb210e15b5971f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 16 May 2023 18:19:04 +1000 Subject: [PATCH] Fixes for encrypted casts --- app/Casts/EncryptedCast.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Casts/EncryptedCast.php b/app/Casts/EncryptedCast.php index a65e00aab386..da17fac8b916 100644 --- a/app/Casts/EncryptedCast.php +++ b/app/Casts/EncryptedCast.php @@ -16,8 +16,8 @@ use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class EncryptedCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes) - {nlog($value); - return !$value ? null : decrypt($value); + { + return ! is_null($value) ? decrypt($value) : null; } public function set($model, string $key, $value, array $attributes)