From: Michael M Slusarz Date: Mon, 26 Apr 2010 21:35:56 +0000 (-0600) Subject: query can be null here - it is in ALL search X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7727503752224375825fcb9f585932c527ace735;p=horde.git query can be null here - it is in ALL search --- diff --git a/imp/lib/Search.php b/imp/lib/Search.php index 001185f8b..3538b0ca2 100644 --- a/imp/lib/Search.php +++ b/imp/lib/Search.php @@ -341,13 +341,15 @@ class IMP_Search } /* Make sure we search in the proper charset. */ - $new_query = clone $query; - $imap_charset = $GLOBALS['imp_imap']->ob()->validSearchCharset('UTF-8') - ? 'UTF-8' - : 'US-ASCII'; - $new_query->charset($imap_charset, array('Horde_String', 'convertCharset')); + if ($query) { + $query = clone $query; + $imap_charset = $GLOBALS['imp_imap']->ob()->validSearchCharset('UTF-8') + ? 'UTF-8' + : 'US-ASCII'; + $query->charset($imap_charset, array('Horde_String', 'convertCharset')); + } - return $GLOBALS['imp_imap']->ob()->search($mailbox, $new_query, $opts); + return $GLOBALS['imp_imap']->ob()->search($mailbox, $query, $opts); } /**