From: eileen Date: Thu, 6 Sep 2018 04:04:05 +0000 (+1200) Subject: Fix caching to not treat an empty array as a cache miss. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f468a50ad46be49aa635ca44c45bf8fc8af9910;p=civicrm-core.git Fix caching to not treat an empty array as a cache miss. Only NULL is a cache miss.... --- diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 5cef5e081e..c22ec91e29 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -539,7 +539,7 @@ class CRM_Core_PseudoConstant { $cacheKey = CRM_Core_BAO_Cache::cleanKey("CRM_PC_{$name}_{$all}_{$key}_{$retrieve}_{$filter}_{$condition}_{$orderby}"); $cache = CRM_Utils_Cache::singleton(); $var = $cache->get($cacheKey); - if ($var && empty($force)) { + if ($var !== NULL && empty($force)) { return $var; }