Skip to content

Commit

Permalink
Changing the checks surrounding dataExpression to use empty() instead…
Browse files Browse the repository at this point in the history
… of isset() so unexpected things don't happen if you ever use dataExpression = false. Fixes #1521
  • Loading branch information
markstory committed Feb 24, 2011
1 parent 9367a10 commit 139d6b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/jquery_engine.php
Expand Up @@ -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']);
}
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/mootools_engine.php
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/prototype_engine.php
Expand Up @@ -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']);
}
Expand Down

0 comments on commit 139d6b3

Please sign in to comment.