From fb745cc7d13d3cf5142d9c36dbd7539041599508 Mon Sep 17 00:00:00 2001 From: graf25 Date: Fri, 12 Apr 2002 03:10:29 +0000 Subject: [PATCH] Just fixing a bug I ran across where attachments was an empty array. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2709 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/signout.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/signout.php b/src/signout.php index d2e46f76..1b095056 100644 --- a/src/signout.php +++ b/src/signout.php @@ -17,19 +17,19 @@ require_once('../functions/plugin.php'); require_once('../functions/strings.php'); /* Erase any lingering attachments */ -if (! isset($attachments)) { - $attachments = array(); -} -$hashed_attachment_dir = getHashedDir($username, $attachment_dir); -foreach ($attachments as $info) { - $attached_file = "$hashed_attachment_dir/$info[localfilename]"; - if (file_exists($attached_file)) { - unlink($attached_file); +if (isset($attachments) && is_array($attachments) + && sizeof($attachments)){ + $hashed_attachment_dir = getHashedDir($username, $attachment_dir); + foreach ($attachments as $info) { + $attached_file = "$hashed_attachment_dir/$info[localfilename]"; + if (file_exists($attached_file)) { + unlink($attached_file); + } } } if (!isset($frame_top)) { - $frame_top = '_top'; + $frame_top = '_top'; } /* If a user hits reload on the last page, $base_uri isn't set -- 2.25.1