X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FMember%2FPseudoConstant.php;h=dedf38aaaf0da074d9d5a418a903ee4e0333335e;hb=14b9e069607c6cbcbbaf21a209f647ba422b8e04;hp=b95c78aa03e0037620b1bb47e43d791d572055bd;hpb=49cfbaed65e6920698d83b57985df1eb228479a2;p=civicrm-core.git diff --git a/CRM/Member/PseudoConstant.php b/CRM/Member/PseudoConstant.php index b95c78aa03..dedf38aaaf 100644 --- a/CRM/Member/PseudoConstant.php +++ b/CRM/Member/PseudoConstant.php @@ -92,11 +92,11 @@ class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant { * @param bool $allStatus * * @return array - * array reference of all membership statuses if any + * array reference of all membership statuses if any */ public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE, $allStatus = FALSE) { if (self::$membershipStatus === NULL) { - self::$membershipStatus = array(); + self::$membershipStatus = []; } $cacheKey = $column; @@ -132,6 +132,9 @@ class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant { if (isset(self::$$name)) { self::$$name = NULL; } + // The preferred source of membership pseudoconstants is in fact the Core class. + // which buildOptions accesses - better flush that too. + CRM_Core_PseudoConstant::flush(); } }