From 4f468a50ad46be49aa635ca44c45bf8fc8af9910 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 6 Sep 2018 16:04:05 +1200 Subject: [PATCH] Fix caching to not treat an empty array as a cache miss. Only NULL is a cache miss.... --- CRM/Core/PseudoConstant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1