From 22e36cb0574a7c98d7324b32bcbe1ef8c9ce6e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Wed, 11 Nov 2009 23:47:23 -0430 Subject: [PATCH] Fixing bug where sometimes key($data[0]) returned empty string instead of first key in array --- cake/libs/model/model.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 123bcd95fc6..ceaa60eae8e 100644 --- a/cake/libs/model/model.php +++ b/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 );