From 68b57431ba95cb12186f975579af725ed09f2ae3 Mon Sep 17 00:00:00 2001 From: Bart van Bragt Date: Mon, 14 Jan 2002 20:16:09 +0000 Subject: [PATCH] Fixed problem with msg v.s. msgs when deleting (#503157) git-svn-id: file:///svn/phpbb/trunk@1872 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/privmsg.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index a232c0b0d7..3b2557d80a 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -580,6 +580,11 @@ else if( ( $delete && $mark_list ) || $delete_all ) { header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } + if( isset($mark_list) && !is_array($mark_list) ) + { + // Set to empty array instead of '0' if nothing is selected. + $mark_list = array(); + } if( !$confirm ) { @@ -601,7 +606,7 @@ else if( ( $delete && $mark_list ) || $delete_all ) ); $template->assign_vars(array( "MESSAGE_TITLE" => $lang['Information'], - "MESSAGE_TEXT" => ( count($mark_list) == 1 ) ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'], + "MESSAGE_TEXT" => ( count($mark_list) == 1) ? $lang['Confirm_delete_pm'] : $lang['Confirm_delete_pms'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'],