diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index be22ad895..956775b1a 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -670,7 +670,7 @@ abstract class AbstractQuery $this->setParameters($params); } - $saveCache = function() {}; + $setCacheEntry = function() {}; if ($this->_hydrationCacheProfile !== null) { list($cacheKey, $realCacheKey) = $this->getHydrationCacheId(); @@ -685,7 +685,8 @@ abstract class AbstractQuery if ( ! $result) { $result = array(); } - $saveCache = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) { + + $setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) { $result[$realCacheKey] = $data; $cache->save($cacheKey, $result, $qcp->getLifetime()); }; @@ -694,7 +695,7 @@ abstract class AbstractQuery $stmt = $this->_doExecute(); if (is_numeric($stmt)) { - $saveCache($stmt); + $setCacheEntry($stmt); return $stmt; } @@ -702,7 +703,7 @@ abstract class AbstractQuery $stmt, $this->_resultSetMapping, $this->_hints ); - $saveCache($data); + $setCacheEntry($data); return $data; }