mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 18:44:04 +00:00
🐛 Don't consider null types for decryption
This commit is contained in:
parent
9594cd0857
commit
4b070da81f
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ trait VirtualColumn
|
|||
foreach ($this->getAttribute(static::getDataColumn()) ?? [] as $key => $value) {
|
||||
$attributeHasEncryptedCastable = in_array(data_get($this->getCasts(), $key), $encryptedCastables);
|
||||
|
||||
if ($attributeHasEncryptedCastable && $this->valueEncrypted($value)) {
|
||||
if ($value && $attributeHasEncryptedCastable && $this->valueEncrypted($value)) {
|
||||
$this->attributes[$key] = $value;
|
||||
} else {
|
||||
$this->setAttribute($key, $value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue