projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a897d9
)
Fix caching to not treat an empty array as a cache miss.
author
eileen
<emcnaughton@wikimedia.org>
Thu, 6 Sep 2018 04:04:05 +0000
(16:04 +1200)
committer
eileen
<emcnaughton@wikimedia.org>
Thu, 6 Sep 2018 04:04:05 +0000
(16:04 +1200)
Only NULL is a cache miss....
CRM/Core/PseudoConstant.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/PseudoConstant.php
b/CRM/Core/PseudoConstant.php
index 5cef5e081eb4aa7da36d8443963f24754d69c2de..c22ec91e29164a6b2e73ec5b607b3941b339ba12 100644
(file)
--- 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;
}