From: Eileen McNaughton Date: Thu, 23 Jan 2014 20:57:27 +0000 (+1300) Subject: CRM-14120 e-notice error due to returning NULL not by reference, From what I recall... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=870b407685e1833a23e20e788875ba9b0fd522b0;p=civicrm-core.git CRM-14120 e-notice error due to returning NULL not by reference, From what I recall php lazy copying means that we don't lose any performance benefit by not returning as a referenct ---------------------------------------- * CRM-14120: Notice Notice: Only variable references should be returned by reference in event() (line 122 of /srv/www/womenslibrary.org.uk/sites/all/modules/civicrm/CRM/Event/PseudoConstant.php). http://issues.civicrm.org/jira/browse/CRM-14120 --- diff --git a/CRM/Event/PseudoConstant.php b/CRM/Event/PseudoConstant.php index 7dc8d73bf3..9e06923878 100644 --- a/CRM/Event/PseudoConstant.php +++ b/CRM/Event/PseudoConstant.php @@ -97,10 +97,10 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant { * * @access public * - * @return array - array reference of all events if any + * @return array - array of all events if any * @static */ - public static function &event($id = NULL, $all = FALSE, $condition = NULL) { + public static function event($id = NULL, $all = FALSE, $condition = NULL) { $key = "{$id}_{$all}_{$condition}"; if (!isset(self::$event[$key])) {