Skip to content
Permalink
Browse files

Fixing faling test case

  • Loading branch information...
lorenzo committed Apr 30, 2012
1 parent 72e8992 commit 05abff6ecd2f318fabb364160b320b53555db916
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/Cake/Model/Validator/CakeRule.php
@@ -144,14 +144,11 @@ public function isValid() {
* @return boolean
*/
public function isRequired() {
if (is_bool($this->required)) {
return $this->required;
}
if (in_array($this->required, array('create', 'update'), true)) {
if ($this->required === 'create' && !$this->isUpdate() || $this->required === 'update' && $this->isUpdate()) {
$this->required = true;
return true;
} else {
$this->required = false;
return false;
}
}

0 comments on commit 05abff6

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