From: eileen Date: Thu, 11 Aug 2016 05:07:00 +0000 (+1200) Subject: Fix caching bug in DAO commit PR X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d1e87684a084d10a62290b4bbb7697a575334f6;p=civicrm-core.git Fix caching bug in DAO commit PR --- 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]);