This is an alternative to https://github.com/civicrm/civicrm-core/pull/12888
I wasn't actually able to reproduce the issue but this solution, proposed by
Monish, seems safe & sensible
}
/**
- * @param $contributionIDs
+ * @param string $contributionIDs
*
* @return array
*/
public static function &getDetails($contributionIDs) {
+ if (empty($contributionIDs)) {
+ return [];
+ }
$query = "
SELECT c.id as contribution_id,
c.contact_id as contact_id ,
$dao = CRM_Core_DAO::executeQuery($query,
CRM_Core_DAO::$_nullArray
);
- $rows = array();
while ($dao->fetch()) {
$rows[$dao->contribution_id]['component'] = $dao->participant_id ? 'event' : 'contribute';