Skip to content
This repository
Browse code

Updating doc block.

Removing redundant condition.
  • Loading branch information...
commit e04cc816137ea216f90d569ac86a480c7262900b 1 parent f59e401
Mark Story authored October 12, 2009

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  cake/libs/model/model.php
8  cake/libs/model/model.php
@@ -985,11 +985,11 @@ function hasField($name) {
985 985
 	}
986 986
 /**
987 987
  * Initializes the model for writing a new record, loading the default values
988  
- * for those fields that are not defined in $data. Especially helpful for
989  
- * saving data in loops.
  988
+ * for those fields that are not defined in $data, and clearing previous validation errors. 
  989
+ * Especially helpful for saving data in loops.
990 990
  *
991 991
  * @param mixed $data Optional data array to assign to the model after it is created.  If null or false,
992  
- *                    schema data defaults are not merged.
  992
+ *   schema data defaults are not merged.
993 993
  * @param boolean $filterKey If true, overwrites any primary key input with an empty value
994 994
  * @return array The current Model::data; after merging $data and/or defaults from database
995 995
  * @access public
@@ -2656,7 +2656,7 @@ function setDataSource($dataSource = null) {
2656 2656
 			$this->tablePrefix = $db->config['prefix'];
2657 2657
 		}
2658 2658
 
2659  
-		if (empty($db) || $db == null || !is_object($db)) {
  2659
+		if (empty($db) || !is_object($db)) {
2660 2660
 			return $this->cakeError('missingConnection', array(array('className' => $this->alias)));
2661 2661
 		}
2662 2662
 	}

0 notes on commit e04cc81

Please sign in to comment.
Something went wrong with that request. Please try again.