From c725576db6632b95934290bc95fdb2c872ab07c3 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Fri, 6 Jan 2017 14:59:23 -0500 Subject: [PATCH] specify used variable in php closure this resolves an issue with a recent change that introduced an anonymous function with a closure. the used variable must be specified in the funciton definition. --- memberdashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memberdashboard.php b/memberdashboard.php index e795746..f37cb45 100644 --- a/memberdashboard.php +++ b/memberdashboard.php @@ -126,7 +126,7 @@ function memberdashboard_civicrm_post($op, $objectName, $objectId, &$objectRef) // organization's sake. // Get the oldest join date for the contact's memberships. - $getDao = function () { + $getDao = function () use ($objectRef) { $contactId = $objectRef->contact_id; $dao = CRM_Core_DAO::executeQuery( -- 2.25.1