Merge remote-tracking branch 'MarcMichalsky/issue/39'
[#39] Trim project IDs when extracting from profile configuration
This commit is contained in:
commit
69764ffc11
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue