Fix to getDirty() when using MD5Updates Trait on attributes

This commit is contained in:
2025-01-16 10:33:45 +11:00
parent fbb5358d9a
commit 6e860d05dc
4 changed files with 4 additions and 24 deletions

View File

@@ -233,10 +233,8 @@ class Attribute implements \Countable, \ArrayAccess
*/
public function isDirty(): bool
{
if ($this->oldValues->count() !== $this->values->count())
return TRUE;
return $this->values->diff($this->oldValues)->count() !== 0;
return ($this->oldValues->count() !== $this->values->count())
|| ($this->values->diff($this->oldValues)->count() !== 0);
}
public function oldValues(array $array): void