1
0
mirror of synced 2025-02-09 00:39:25 +03:00

Merge pull request #1411 from icambridge/patch-1

Allow null to be passed to setHydrationCacheProfile
This commit is contained in:
Benjamin Eberlei 2015-06-16 21:54:08 +02:00
commit 6423a33a23

View File

@ -502,7 +502,7 @@ abstract class AbstractQuery
*/
public function setHydrationCacheProfile(QueryCacheProfile $profile = null)
{
if ( ! $profile->getResultCacheDriver()) {
if ($profile !== null && ! $profile->getResultCacheDriver()) {
$resultCacheDriver = $this->_em->getConfiguration()->getHydrationCacheImpl();
$profile = $profile->setResultCacheDriver($resultCacheDriver);
}