Permalink
Browse files

Fixing bug where sometimes key($data[0]) returned empty string instea…

…d of first key in array
  • Loading branch information...
1 parent a81edb6 commit 22e36cb0574a7c98d7324b32bcbe1ef8c9ce6e97 @lorenzo lorenzo committed Nov 12, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 cake/libs/model/model.php
@@ -802,7 +802,7 @@ function setSource($tableName) {
}
/**
- * This function does two things:
+ * This function does two things:
*
* 1. it scans the array $one for the primary key,
* and if that's found, it sets the current id to the value of $one[id].
@@ -1043,7 +1043,7 @@ function hasField($name, $checkVirtual = false) {
/**
* Initializes the model for writing a new record, loading the default values
- * for those fields that are not defined in $data, and clearing previous validation errors.
+ * 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,
@@ -1996,7 +1996,7 @@ function hasAny($conditions = null) {
* second parameter options for finding ( indexed array, including: 'conditions', 'limit',
* 'recursive', 'page', 'fields', 'offset', 'order')
*
- * Eg:
+ * Eg:
* {{{
* find('all', array(
* 'conditions' => array('name' => 'Thomas Anderson'),
@@ -2567,7 +2567,7 @@ function invalidFields($options = array()) {
$valid = preg_match($rule, $data[$fieldName]);
} elseif (Configure::read('debug') > 0) {
$error = sprintf(
- __('Could not find validation handler %s for %s', true),
+ __('Could not find validation handler %s for %s', true),
$rule,
$fieldName
);

0 comments on commit 22e36cb

Please sign in to comment.