Fix to getDirty() when using MD5Updates Trait on attributes
This commit is contained in:
@@ -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
|
||||
|
@@ -14,13 +14,6 @@ final class JpegPhoto extends Binary
|
||||
{
|
||||
use MD5Updates;
|
||||
|
||||
public function __construct(string $name,array $values)
|
||||
{
|
||||
parent::__construct($name,$values);
|
||||
|
||||
$this->internal = FALSE;
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
|
||||
{
|
||||
return view('components.attribute.binary.jpegphoto')
|
||||
|
Reference in New Issue
Block a user