From 139d6b3133bfe1068a1fbee50fd1605d28dbe561 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 23 Feb 2011 21:15:39 -0500 Subject: [PATCH] Changing the checks surrounding dataExpression to use empty() instead of isset() so unexpected things don't happen if you ever use dataExpression = false. Fixes #1521 --- cake/libs/view/helpers/jquery_engine.php | 2 +- cake/libs/view/helpers/mootools_engine.php | 2 +- cake/libs/view/helpers/prototype_engine.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/view/helpers/jquery_engine.php b/cake/libs/view/helpers/jquery_engine.php index 16668d08b48..54e9a758997 100644 --- a/cake/libs/view/helpers/jquery_engine.php +++ b/cake/libs/view/helpers/jquery_engine.php @@ -269,7 +269,7 @@ function request($url, $options = array()) { unset($options['update']); } $callbacks = array('success', 'error', 'beforeSend', 'complete'); - if (isset($options['dataExpression'])) { + if (!empty($options['dataExpression'])) { $callbacks[] = 'data'; unset($options['dataExpression']); } diff --git a/cake/libs/view/helpers/mootools_engine.php b/cake/libs/view/helpers/mootools_engine.php index 2ade6069ccf..693d845976b 100644 --- a/cake/libs/view/helpers/mootools_engine.php +++ b/cake/libs/view/helpers/mootools_engine.php @@ -252,7 +252,7 @@ function request($url, $options = array()) { } $options['url'] = $url; $options = $this->_prepareCallbacks('request', $options); - if (isset($options['dataExpression'])) { + if (!empty($options['dataExpression'])) { $callbacks[] = 'data'; unset($options['dataExpression']); } elseif (!empty($data)) { diff --git a/cake/libs/view/helpers/prototype_engine.php b/cake/libs/view/helpers/prototype_engine.php index 848b676a2a5..7d49ae07ead 100644 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/cake/libs/view/helpers/prototype_engine.php @@ -244,7 +244,7 @@ function request($url, $options = array()) { } $safe = array_keys($this->_callbackArguments['request']); $options = $this->_prepareCallbacks('request', $options, $safe); - if (isset($options['dataExpression'])) { + if (!empty($options['dataExpression'])) { $safe[] = 'parameters'; unset($options['dataExpression']); }