mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Remove typehint from generateAssociationQuery()
While I think typehints are generally a good idea, this one broke a few plugins, notably CakeDC/search. I don't think it is wise for 2.X release to break BC in that way. I think reverting this change is probably the safest path right now.
This commit is contained in:
parent
5a944734b8
commit
3a226b03c3
1 changed files with 4 additions and 0 deletions
|
@ -1644,6 +1644,10 @@ class DboSource extends DataSource {
|
||||||
public function generateAssociationQuery(Model $Model, $LinkModel, $type, $association, $assocData, &$queryData, $external) {
|
public function generateAssociationQuery(Model $Model, $LinkModel, $type, $association, $assocData, &$queryData, $external) {
|
||||||
$assocData = $this->_scrubQueryData($assocData);
|
$assocData = $this->_scrubQueryData($assocData);
|
||||||
|
|
||||||
|
if ($LinkModel === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($external && !empty($assocData['finderQuery'])) {
|
if ($external && !empty($assocData['finderQuery'])) {
|
||||||
return $assocData['finderQuery'];
|
return $assocData['finderQuery'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue