Skip to content
Browse files

Fixing faling test case

  • Loading branch information...
1 parent 72e8992 commit 05abff6ecd2f318fabb364160b320b53555db916 @lorenzo lorenzo committed Apr 29, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/Cake/Model/Validator/CakeRule.php
View
7 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.
Something went wrong with that request. Please try again.