From 0debfed69a4658cb5ccfd490327bc52988f40325 Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 13 Dec 2000 23:38:03 +0000 Subject: [PATCH] Fixed bug where str_repeat was called with 0 as multiplier. Simple "if" statement around the command. :-) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@885 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 21ee5a80..ed043c7b 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -144,7 +144,10 @@ (ereg("^".$folder_prefix, $mailbox)) || ( isset($boxesbyname[$parentfolder]) && (strlen($parentfolder) > 0) ) ) { $indent = $dm_count - (countCharInString($folder_prefix, $dm)); - $boxes[$g]["formatted"] = str_repeat("  ", $indent); + if ($indent) + $boxes[$g]["formatted"] = str_repeat("  ", $indent); + else + $boxes[$g]["formatted"] = ''; $boxes[$g]["formatted"] .= readShortMailboxName($mailbox, $dm); } else { $boxes[$g]["formatted"] = $mailbox; @@ -333,7 +336,10 @@ if((eregi("^inbox".quotemeta($dm), $mailbox)) || (ereg("^".$folder_prefix, $mailbox)) || ( isset($boxesbyname[$parentfolder]) && (strlen($parentfolder) > 0) ) ) { - $boxes[$g]["formatted"] = str_repeat("  ", $dm_count); + if ($dm_count) + $boxes[$g]["formatted"] = str_repeat("  ", $dm_count); + else + $boxes[$g]["formatted"] = ''; $boxes[$g]["formatted"] .= readShortMailboxName($mailbox, $dm); } else { $boxes[$g]["formatted"] = $mailbox; -- 2.25.1