Fixes #3191, Undefined variable: _hour

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5656 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-09-16 18:54:09 +00:00
parent 6c650e2371
commit 7c40e8d6c9

View file

@ -962,10 +962,10 @@ class Controller extends Object {
} }
if (isset($time['_hour']) && $time['_hour'] != 12 && 'pm' == $meridian) { if (isset($time['_hour']) && $time['_hour'] != 12 && 'pm' == $meridian) {
$time['_hour'] = $_hour + 12; $time['_hour'] = $time['_hour'] + 12;
} }
if (isset($time['_hour']) && $time['_hour'] == 12 && 'am' == $meridian) { if (isset($time['_hour']) && $time['_hour'] == 12 && 'am' == $meridian) {
$time['_hour'] = '00'; $time['_hour'] = '00';
} }
$time = join(':', array_values($time)); $time = join(':', array_values($time));
@ -974,7 +974,7 @@ class Controller extends Object {
} }
} }
if ($useNewDate && (isset($date) || $value['null'])) { if ($useNewDate && (isset($date) || isset($value['null']))) {
$this->data[$modelClass][$field] = $date; $this->data[$modelClass][$field] = $date;
} }
} }