diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 37e33b824..6ceeb0b22 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -939,7 +939,7 @@ class Controller extends Object { if ($_hour != 12 && (isset($this->data[$modelClass][$field['name'] . '_meridian']) && 'pm' == $this->data[$modelClass][$field['name'] . '_meridian'])) { $_hour = $_hour + 12; } - if ($hour == 12 && 'am' == $this->data[$modelName][$field['name'] . '_meridian']) { + if ($hour == 12 && (isset($this->data[$modelClass][$field['name'] . '_meridian']) && 'am' == $this->data[$modelName][$field['name'] . '_meridian']) { $hour = '00'; } unset($this->data[$modelClass][$field['name'] . '_meridian']);