X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPseudoConstant.php;h=c22ec91e29164a6b2e73ec5b607b3941b339ba12;hb=4f468a50ad46be49aa635ca44c45bf8fc8af9910;hp=81bdb6f232eb264a21ebf2f532fa3a1b75c7a2b0;hpb=f118320a31b52481a17dae33b46b1826fa71d0de;p=civicrm-core.git diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 81bdb6f232..c22ec91e29 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -170,7 +170,7 @@ class CRM_Core_PseudoConstant { /** * Low-level option getter, rarely accessed directly. * NOTE: Rather than calling this function directly use CRM_*_BAO_*::buildOptions() - * @see http://wiki.civicrm.org/confluence/display/CRMDOC/Pseudoconstant+%28option+list%29+Reference + * @see https://docs.civicrm.org/dev/en/latest/framework/pseudoconstant/ * * NOTE: If someone undertakes a refactoring of this, please consider the use-case of * the Setting.getoptions API. There is no DAO/field, but it would be nice to use the @@ -536,10 +536,10 @@ class CRM_Core_PseudoConstant { $key = 'id', $force = NULL ) { - $cacheKey = "CRM_PC_{$name}_{$all}_{$key}_{$retrieve}_{$filter}_{$condition}_{$orderby}"; + $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; }