Skip to content

Commit

Permalink
Check for empty field
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoryduckworth committed Mar 6, 2018
1 parent 771ba13 commit 4ade5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EncryptableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 4ade5d7

Please sign in to comment.