From 4ade5d782742ef1ad116974978609b42263701ed Mon Sep 17 00:00:00 2001 From: Greg Duckworth Date: Tue, 6 Mar 2018 08:31:40 +0000 Subject: [PATCH] Check for empty field --- src/EncryptableTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EncryptableTrait.php b/src/EncryptableTrait.php index 0cc8316..71b7506 100644 --- a/src/EncryptableTrait.php +++ b/src/EncryptableTrait.php @@ -15,7 +15,7 @@ trait EncryptableTrait public function getAttribute($key) { $value = parent::getAttribute($key); - if (in_array($key, $this->encryptable)) { + if (in_array($key, $this->encryptable) && $value !== '') { $value = decrypt($value); }