From 496b4e4ae2f97a8a080c5c033731e94b2ded456a Mon Sep 17 00:00:00 2001 From: Kieran Brahney Date: Thu, 15 Sep 2022 12:37:55 +0100 Subject: [PATCH] Fix undefined index 'count' --- lib/Horde/Imap/Client/Socket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Horde/Imap/Client/Socket.php b/lib/Horde/Imap/Client/Socket.php index 3449fb1a..bc16a4e2 100644 --- a/lib/Horde/Imap/Client/Socket.php +++ b/lib/Horde/Imap/Client/Socket.php @@ -2550,7 +2550,7 @@ protected function _search($query, $options) switch ($val) { case Horde_Imap_Client::SEARCH_RESULTS_COUNT: $ret['count'] = ($esearch && !$partial) - ? $er['count'] + ? (isset($er['count']) ? $er['count'] : 0) : count($sr); break;