Civi Grant User Dashboard Error
I would have logged this as an issue on the extension GitHub but it seems to have been set to an archive mode.
For certain users, and I haven’t worked out why, when accessing the user dashboard a DB Syntax Error is thrown. On inspection the error is caused at line 444,445 of grantapplications.php. If I comment out the final line of the query it runs fine.
$query = "SELECT
grant_type_id,
application_received_date,
amount_total,
status_id,
id,
currency
{$extraSelect}
FROM civicrm_grant
WHERE contact_id = {$values['cid']}";
// AND status_id = " . array_search('Draft', $grantStatusByName);
For some users it appears that the array_search is either not returning anything or is returning and invalid value for the select. OR the routine only gets called for users who have particular relationship types.
Thanks Jonathan
Edited by Monish Deb