$values['contribution_status'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution->contribution_status_id);
$return = $contribution->composeMessageArray($input, $ids, $values, $returnMessageText);
// Contribution ID should really always be set. But ?
- if (!$returnMessageText && (!isset($input['receipt_update']) || $input['receipt_update']) && empty($contribution->receipt_date)) {
+ if ((!isset($input['receipt_update']) || $input['receipt_update']) && empty($contribution->receipt_date)) {
civicrm_api3('Contribution', 'create', array('receipt_date' => 'now', 'id' => $contribution->id));
}
return $return;