Skip to content

Commit

Permalink
Dirty should ignore loose type in PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
romaninsh committed Oct 5, 2016
1 parent 3463398 commit 33377f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model.php
Expand Up @@ -498,7 +498,7 @@ public function set($field, $value = null)

$current_value = array_key_exists($field, $this->data) ? $this->data[$field] : $original_value;

if ($value === $current_value) {
if ($value == $current_value) {
// do nothing, value unchanged
return $this;
}
Expand Down Expand Up @@ -526,7 +526,7 @@ public function set($field, $value = null)
}
}

if (array_key_exists($field, $this->dirty) && $this->dirty[$field] === $value) {
if (array_key_exists($field, $this->dirty) && $this->dirty[$field] == $value) {
unset($this->dirty[$field]);
} elseif (!array_key_exists($field, $this->dirty)) {
$this->dirty[$field] =
Expand Down

0 comments on commit 33377f7

Please sign in to comment.