Merge pull request #7455 from dhensby/pulls/fix-circular-ref-issue

FIX Dont use var_export for cache key generation
This commit is contained in:
Damian Mooyman 2017-10-10 10:16:16 +13:00 committed by GitHub
commit 7f5ca56e36

View File

@ -3224,7 +3224,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
$SNG = singleton($callerClass); $SNG = singleton($callerClass);
$cacheComponents = array($filter, $orderby, $SNG->extend('cacheKeyComponent')); $cacheComponents = array($filter, $orderby, $SNG->extend('cacheKeyComponent'));
$cacheKey = md5(var_export($cacheComponents, true)); $cacheKey = md5(serialize($cacheComponents));
// Flush destroyed items out of the cache // Flush destroyed items out of the cache
if($cache && isset(DataObject::$_cache_get_one[$callerClass][$cacheKey]) if($cache && isset(DataObject::$_cache_get_one[$callerClass][$cacheKey])