mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding fix for Ticket #2821, fixes Controller::postConditions() overrides $data passed in.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5343 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
905549cc89
commit
51aa81f336
1 changed files with 7 additions and 5 deletions
|
@ -875,13 +875,15 @@ class Controller extends Object {
|
|||
* @return array An array of model conditions
|
||||
*/
|
||||
function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) {
|
||||
if ((!is_array($data) || empty($data)) && empty($this->data)) {
|
||||
return null;
|
||||
} elseif (!empty($this->data)) {
|
||||
$data = $this->data;
|
||||
if (!is_array($data) || empty($data)) {
|
||||
if (!empty($this->data)) {
|
||||
$data = $this->data;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
$cond = array();
|
||||
|
||||
if ($op === null) {
|
||||
$op = '';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue