Skip to content
Permalink
Browse files

Don't break on removing a non-existing rule

  • Loading branch information...
WrDX committed Mar 9, 2018
1 parent fb5c3ec commit 1f0c9736819b8bb879641bb6cbaaf5ddc826c7e4
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/ModelValidator.php
@@ -594,7 +594,7 @@ public function remove($field, $rule = null) {
$this->_parseRules();
if ($rule === null) {
unset($this->_fields[$field]);
} else {
} elseif (array_key_exists($field, $this->_fields)) {
$this->_fields[$field]->removeRule($rule);
}
return $this;

0 comments on commit 1f0c973

Please sign in to comment.
You can’t perform that action at this time.