From aa9a9a86405156c73b3fc162896ffabc60b8b539 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Thu, 10 Sep 2015 21:00:50 +0000 Subject: [PATCH] Check for error opening directory git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14524 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/newmail/newmail_opt.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index 366068d6..efbf8ec9 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -146,18 +146,20 @@ if ($newmail_allowsound) { echo '>' . _("(none)") . '' . "\n"; // Iterate sound files for options $d = dir(SM_PATH . 'plugins/newmail/sounds'); - while($entry=$d->read()) { - // $fname = get_location () . '/sounds/' . $entry; - if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') { - echo '\n"; } - echo 'value="' . sm_encode_html_special_chars($entry) . '">' . - sm_encode_html_special_chars($entry) . "\n"; } + $d->close(); } - $d->close(); // display media selection foreach($newmail_mmedia as $newmail_mm_name => $newmail_mm_data) { echo '