From 3970c082f61c1bfbcad04fb86f881aab62189499 Mon Sep 17 00:00:00 2001 From: Steven Sullivan <17299026+SS88UK@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:15:09 -0500 Subject: [PATCH] Improve error handling --- easy_unsubscribe.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easy_unsubscribe.php b/easy_unsubscribe.php index 1927e0e..33fbbd7 100644 --- a/easy_unsubscribe.php +++ b/easy_unsubscribe.php @@ -35,6 +35,8 @@ class easy_unsubscribe extends rcube_plugin { if($this->message_headers_done===false) { $this->message_headers_done = true; + if(!isset($p['headers']->others['list-unsubscribe'])) return $p; + $ListUnsubscribe = $p['headers']->others['list-unsubscribe']; if (preg_match_all('/<(.+)>/mU', $ListUnsubscribe, $items, PREG_PATTERN_ORDER)) { @@ -59,4 +61,4 @@ class easy_unsubscribe extends rcube_plugin { } -} \ No newline at end of file +}