Skip to content

Commit

Permalink
Set errors with array_replace instead of array_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn de Hoog authored and markstory committed Jun 20, 2018
1 parent 2ec5ff7 commit 4d529df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Datasource/EntityTrait.php
Expand Up @@ -947,7 +947,7 @@ public function setErrors(array $fields, $overwrite = false)
$this->_errors += [$f => []];
$this->_errors[$f] = $overwrite ?
(array)$error :
array_merge($this->_errors[$f], (array)$error);
array_replace($this->_errors[$f], (array)$error);
}

return $this;
Expand Down

0 comments on commit 4d529df

Please sign in to comment.