mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
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:
parent
9367a10522
commit
139d6b3133
3 changed files with 3 additions and 3 deletions
|
@ -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']);
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue