Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

assert proper array access for _dateTimeSelected()

  • Loading branch information...
commit eb13242680731f8c1cf82786670f5fe40d06f6f3 1 parent 111bfa4
@dereuromark dereuromark authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/View/Helper/FormHelper.php
View
4 lib/Cake/View/Helper/FormHelper.php
@@ -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']) {
Please sign in to comment.
Something went wrong with that request. Please try again.