Browse Source

Fixing a couple errors introduced in previous commit

Jose Lorenzo Rodriguez 14 years ago
parent
commit
efc3536adb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/Cake/Model/ModelValidator.php

+ 2 - 2
lib/Cake/Model/ModelValidator.php

@@ -249,7 +249,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
  * @return void
  */
 	public function invalidate($field, $message = true) {
-		$this->getModel()->validationErrors[$field][] = $value;
+		$this->getModel()->validationErrors[$field][] = $message;
 	}
 
 /**
@@ -286,7 +286,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
 		if ($name !== null && !empty($this->_fields[$name])) {
 			return $this->_fields[$name];
 		} elseif ($name !==null) {
-			return null
+			return null;
 		}
 		return $this->_fields;
 	}