Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit b4c568c

Browse files
committed
ensure $this->encrypted is an array if present
1 parent 4eebd7c commit b4c568c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HasEncryptedAttributes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function getEncryptionPrefix(): string
123123
*/
124124
protected function shouldEncrypt($key): bool
125125
{
126-
$encrypt = DatabaseEncryption::isEnabled() && isset($this->encrypted) ? $this->encrypted : [];
126+
$encrypt = DatabaseEncryption::isEnabled() && isset($this->encrypted) && is_array($this->encrypted) ? $this->encrypted : [];
127127

128128
return in_array($key, $encrypt);
129129
}

0 commit comments

Comments
 (0)