From 5d1e87684a084d10a62290b4bbb7697a575334f6 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 11 Aug 2016 17:07:00 +1200 Subject: [PATCH] Fix caching bug in DAO commit PR --- CRM/Core/BAO/Cache.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Core/BAO/Cache.php b/CRM/Core/BAO/Cache.php index 7438a8bea7..1977bf8c46 100644 --- a/CRM/Core/BAO/Cache.php +++ b/CRM/Core/BAO/Cache.php @@ -70,9 +70,8 @@ class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache { if (!self::$_cache[$argString]) { $table = self::getTableName(); $where = self::whereCache($group, $path, $componentID); - $dao = CRM_Core_DAO::executeQuery("SELECT data FROM $table WHERE $where"); - $data = isset($dao->data) ? unserialize($dao->data) : NULL; - $dao->free(); + $rawData = CRM_Core_DAO::singleValueQuery("SELECT data FROM $table WHERE $where"); + $data = $rawData ? unserialize($rawData) : NULL; self::$_cache[$argString] = $data; $cache->set($argString, self::$_cache[$argString]); -- 2.25.1