Permalink
Browse files

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
  • Loading branch information...
1 parent 9367a10 commit 139d6b3133bfe1068a1fbee50fd1605d28dbe561 @markstory markstory committed Feb 24, 2011
@@ -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']);
}
@@ -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)) {
@@ -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']);
}

0 comments on commit 139d6b3

Please sign in to comment.