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

This commit is contained in:
mark_story 2011-02-23 21:15:39 -05:00
parent 9367a10522
commit 139d6b3133
3 changed files with 3 additions and 3 deletions

View file

@ -269,7 +269,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
unset($options['update']);
}
$callbacks = array('success', 'error', 'beforeSend', 'complete');
if (isset($options['dataExpression'])) {
if (!empty($options['dataExpression'])) {
$callbacks[] = 'data';
unset($options['dataExpression']);
}

View file

@ -252,7 +252,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
}
$options['url'] = $url;
$options = $this->_prepareCallbacks('request', $options);
if (isset($options['dataExpression'])) {
if (!empty($options['dataExpression'])) {
$callbacks[] = 'data';
unset($options['dataExpression']);
} elseif (!empty($data)) {

View file

@ -244,7 +244,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
}
$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']);
}