Index: library/Zend/View/Helper/Json.php =================================================================== --- library/Zend/View/Helper/Json.php (revision 25051) +++ library/Zend/View/Helper/Json.php (working copy) @@ -57,17 +57,19 @@ public function json($data, $keepLayouts = false, $encodeData = true) { $options = array(); - if (is_array($keepLayouts)) - { - $options = $keepLayouts; - $keepLayouts = (array_key_exists('keepLayouts', $keepLayouts)) - ? $keepLayouts['keepLayouts'] - : false; - unset($options['keepLayouts']); - $encodeData = (array_key_exists('encodeData', $keepLayouts)) - ? $keepLayouts['encodeData'] - : $encodeData; - unset($options['encodeData']); + if (is_array($keepLayouts)) { + $options = $keepLayouts; + + $keepLayouts = false; + if (array_key_exists('keepLayouts', $options)) { + $keepLayouts = $options['keepLayouts']; + unset($options['keepLayouts']); + } + + if (array_key_exists('encodeData', $options)) { + $encodeData = $options['encodeData']; + unset($options['encodeData']); + } } if ($encodeData) {