Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 3a226b03c3ca5ea255d2e1ec22bb9bd51fc13ea8 1 parent 5a94473
Mark Story markstory authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/Model/Datasource/DboSource.php
4 lib/Cake/Model/Datasource/DboSource.php
View
@@ -1644,6 +1644,10 @@ public function buildAssociationQuery(Model $Model, $queryData) {
public function generateAssociationQuery(Model $Model, $LinkModel, $type, $association, $assocData, &$queryData, $external) {
$assocData = $this->_scrubQueryData($assocData);
+ if ($LinkModel === null) {
+ return '';
+ }
+
if ($external && !empty($assocData['finderQuery'])) {
return $assocData['finderQuery'];
}
Please sign in to comment.
Something went wrong with that request. Please try again.