From 52bf380f2addf7c6bf147fd3655b4cd7e03279bd Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 28 Sep 2007 18:00:55 +0000 Subject: [PATCH] Fix undefined var notices on search page git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12703 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/search.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/search.php b/src/search.php index 061b3e85..20e624a2 100644 --- a/src/search.php +++ b/src/search.php @@ -897,6 +897,12 @@ if (!sqgetGlobalVar('checkall',$checkall,SQ_GET)) { $checkall = false; } +if (!sqgetGlobalVar('preselected', $preselected, SQ_GET) || !is_array($preselected)) { + $preselected = array(); +} else { + $preselected = array_keys($preselected); +} + /** * Retrieve the mailbox cache from the session. */ @@ -1617,6 +1623,7 @@ if ($submit == $search_button_text) { $oTemplate->assign('color', $color); $oTemplate->assign('align', $align); $oTemplate->assign('checkall', $checkall); + $oTemplate->assign('preselected', $preselected); $oTemplate->display('message_list.tpl'); } -- 2.25.1