Skip to content

Commit

Permalink
Unset $db in DboSource::read().
Browse files Browse the repository at this point in the history
After calling $db->queryAssociatin(), it is necessary to unset db. 
This reverts commit 52d4257.
  • Loading branch information
okinaka committed May 13, 2014
1 parent 3c57300 commit 91cb3dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -1140,6 +1140,7 @@ public function read(Model $Model, $queryData = array(), $recursive = null) {
$stack['_joined'] = $joined;

$db->queryAssociation($Model, $LinkModel, $type, $assoc, $assocData, $array, true, $resultSet, $Model->recursive - 1, $stack);
unset($db);

if ($type === 'hasMany' || $type === 'hasAndBelongsToMany') {
$filtered[] = $assoc;
Expand Down

0 comments on commit 91cb3dd

Please sign in to comment.