Skip to content

Commit

Permalink
Merge pull request #14124 from seamuslee001/lab_core_891_52
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
eileenmcnaughton authored Apr 25, 2019
2 parents 2b0afb7 + 44ec349 commit b9c5144
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 @@ -1750,7 +1750,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 b9c5144

Please sign in to comment.