Skip to content

Commit

Permalink
assert proper array access for _dateTimeSelected()
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Jun 18, 2013
1 parent 111bfa4 commit eb13242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -2272,8 +2272,8 @@ public function minute($fieldName, $attributes = array()) {
*/
protected function _dateTimeSelected($select, $fieldName, $attributes) {
if ((empty($attributes['value']) || $attributes['value'] === true) && $value = $this->value($fieldName)) {
if (is_array($value) && isset($value[$select])) {
$attributes['value'] = $value[$select];
if (is_array($value)) {
$attributes['value'] = isset($value[$select]) ? $value[$select] : null;
} else {
if (empty($value)) {
if (!$attributes['empty']) {
Expand Down

0 comments on commit eb13242

Please sign in to comment.