Permalink
Browse files

Updating doc block.

Removing redundant condition.
  • Loading branch information...
1 parent f59e401 commit e04cc816137ea216f90d569ac86a480c7262900b @markstory markstory committed Oct 13, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 cake/libs/model/model.php
@@ -985,11 +985,11 @@ function hasField($name) {
}
/**
* Initializes the model for writing a new record, loading the default values
- * for those fields that are not defined in $data. Especially helpful for
- * saving data in loops.
+ * for those fields that are not defined in $data, and clearing previous validation errors.
+ * Especially helpful for saving data in loops.
*
* @param mixed $data Optional data array to assign to the model after it is created. If null or false,
- * schema data defaults are not merged.
+ * schema data defaults are not merged.
* @param boolean $filterKey If true, overwrites any primary key input with an empty value
* @return array The current Model::data; after merging $data and/or defaults from database
* @access public
@@ -2656,7 +2656,7 @@ function setDataSource($dataSource = null) {
$this->tablePrefix = $db->config['prefix'];
}
- if (empty($db) || $db == null || !is_object($db)) {
+ if (empty($db) || !is_object($db)) {
return $this->cakeError('missingConnection', array(array('className' => $this->alias)));
}
}

0 comments on commit e04cc81

Please sign in to comment.