From 7b241c71396f0c3da590e7f76687c10c6c743e99 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 3 Sep 2013 20:28:37 +0000
Subject: [PATCH] Properly detect and handle empty address lists

The mainly comes in when a MIME header which might contain a list of email
addresses (like Reply-To) is to be parsed, but is empty. The Mail_RFC822
class would return an empty mailbox @ localhost (where 'localhost' is the
default default_domain for mail address list parsing).
---
 include/class.mailparse.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/class.mailparse.php b/include/class.mailparse.php
index f0ae3842e..b9ab3c33f 100644
--- a/include/class.mailparse.php
+++ b/include/class.mailparse.php
@@ -264,6 +264,8 @@ class Mail_Parse {
     }
 
     function parseAddressList($address){
+        if (!$address)
+            return false;
         return Mail_RFC822::parseAddressList($address, null, null,false);
     }
 
-- 
GitLab