Skip to content

Commit

Permalink
veda-consulting-company#100 fix notice messages when custom search ap…
Browse files Browse the repository at this point in the history
…i results return null
  • Loading branch information
mathavanveda committed May 21, 2018
1 parent d5d4c08 commit 852f856
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Gdpr/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ public static function getCustomSearchDetails($name) {
'name' => $name,
));

//MV: Returns lot of notice message when there is no result found.
if (empty($result['count'])) {
return array('id' => NULL, 'label' => NULL);
}
return array('id' => $result['values'][0]['value'], 'label' => $result['values'][0]['description']);
}

Expand Down

0 comments on commit 852f856

Please sign in to comment.