From 7a529f647326aa7ee5ecc161b8a99608ef531e78 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 14 Sep 2022 12:44:35 -0400 Subject: [PATCH] restore string null checks --- CRM/Contact/BAO/Contact.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index d76836577a..087e4d9e51 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2749,6 +2749,10 @@ LEFT JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id ) // adds in `phone` and `email` // in a weird & likely obsolete way.... $contactArray = array_intersect_key((array) $contact, $contact->fields()); + // blech + $contactArray = array_map(function($v) { + return $v === 'null' ? NULL : $v; + }, $contactArray); $tokenProcessor = new TokenProcessor(\Civi::dispatcher(), [ 'smarty' => TRUE, 'class' => __CLASS__, -- 2.25.1