Skip to content

Commit

Permalink
Merge pull request #14114 from lcdservices/5.13
Browse files Browse the repository at this point in the history
dev/core#891 condition on id existenced when retrieving mailing hash
  • Loading branch information
seamuslee001 authored Apr 23, 2019
2 parents 8c7e1d4 + 70d870d commit e941ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ public static function replaceGroups($mailingId, $type, $entity, $entityIds) {
*/
public static function getMailingHash($id) {
$hash = NULL;
if (Civi::settings()->get('hash_mailing_url')) {
if (Civi::settings()->get('hash_mailing_url') && !empty($id)) {
$hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_BAO_Mailing', $id, 'hash', 'id');
}
return $hash;
Expand Down

0 comments on commit e941ee8

Please sign in to comment.