From 0894a4175d33e39eafc7f0101703bf75c5917ad6 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 23 Sep 2022 09:45:47 +0200 Subject: [PATCH] Fix argument #1 ($address) must be of type string, null given --- mail/inc/class.mail_ui.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 74ea48754a..350f103f3e 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -2344,12 +2344,15 @@ $filter['before']= date("d-M-Y", $cutoffdate2); } /** - * Retrive contact info from a given address - * @param $address - * @return mixed + * Retrieve contact info from a given address + * + * @param string|null $address + * @return array */ - static function getContactFromAddress(string $address) + static function getContactFromAddress($address) { + if (empty($address)) return []; + $email = Mail::stripRFC822Addresses([$address]); return $GLOBALS['egw']->contacts->search(