diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index ecd731b90d9..b8bc471fec7 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -708,7 +708,7 @@ function value($options = array(), $field = null, $key = 'value') { } $habtmKey = $this->field(); - if (empty($result) && isset($this->data[$habtmKey][$habtmKey])) { + if (empty($result) && isset($this->data[$habtmKey][$habtmKey]) && is_array($this->data[$habtmKey])) { $result = $this->data[$habtmKey][$habtmKey]; } elseif (empty($result) && isset($this->data[$habtmKey]) && is_array($this->data[$habtmKey])) { if (ClassRegistry::isKeySet($habtmKey)) {