Skip to content

Commit

Permalink
Assign default locator by reference so it could follow instances swap…
Browse files Browse the repository at this point in the history
…ped in TableRegistry facade.
  • Loading branch information
robertpustulka committed May 5, 2015
1 parent 872df7a commit cc0faab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ORM/Locator/LocatorAwareTrait.php
Expand Up @@ -43,7 +43,8 @@ public function locator(LocatorInterface $locator = null)
$this->_locator = $locator;
}
if (!$this->_locator) {
$this->_locator = TableRegistry::locator();
$locator = TableRegistry::locator();
$this->_locator =& $locator;
}
return $this->_locator;
}
Expand Down

0 comments on commit cc0faab

Please sign in to comment.