$query is also used when $responce !='NO'. Fixed undefined notice error.
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 1 Jul 2006 16:52:15 +0000 (16:52 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 1 Jul 2006 16:52:15 +0000 (16:52 +0000)
Reported by Benny Pedersen. Can't understand how he managed to reach that
sqm_trigger_imap_error call.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11339 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/filters/filters.php

index 23fb688408362b7462c07179a94bbc248cb65b2e..f27ff13019b387be3d97521bfc94b8f32fd5642b 100644 (file)
@@ -393,8 +393,8 @@ function filter_search_and_delete($imap_stream, $where, $what, $where_to, $user_
                  sqimap_msgs_list_move ($imap_stream, $ids, $where_to, false);
             }
         } elseif ($response != 'OK') {
+            $query = $search_str . "\r\n".$what ."\r\n";
             if ($response == 'NO') {
-                $query = $search_str . "\r\n".$what ."\r\n";
                 if (strpos($message,'BADCHARSET') !== false ||
                     strpos($message,'character') !== false) {
                     sqm_trigger_imap_error('SQM_IMAP_BADCHARSET',$query, $response, $message);