From 7328b3893df8d53c9e2fc8a19a8843189d84e1bb Mon Sep 17 00:00:00 2001 From: Marc Michalsky Date: Fri, 25 Sep 2020 12:08:09 +0200 Subject: [PATCH] trim project_ids --- CRM/Twingle/Profile.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Twingle/Profile.php b/CRM/Twingle/Profile.php index 9c86f1a..f59d236 100644 --- a/CRM/Twingle/Profile.php +++ b/CRM/Twingle/Profile.php @@ -65,7 +65,12 @@ class CRM_Twingle_Profile { */ public function matches($project_id) { $selector = $this->getAttribute('selector'); - $project_ids = explode(',', $selector); + $project_ids = array_map( + function($project_id) { + return trim($project_id); + }, + explode(',', $selector) + ); return in_array($project_id, $project_ids); }