$filesfound variable may not be set when used in: if(!$filesfound)

This commit is contained in:
Charles-Edouard Coste 2010-03-13 17:44:26 +01:00
parent 16f3bd4e23
commit 37058e3861
1 changed files with 1 additions and 1 deletions

View File

@ -60,9 +60,9 @@ class OC_FILES {
// files and directories
echo('<center><table cellpadding="6" cellspacing="0" border="0" class="browser">');
$filesfound=false;
if (is_dir($directory)) {
if ($dh = opendir($directory)) {
$filesfound=false;
while (($file = readdir($dh)) !== false) {
if($file<>'.' and $file<>'..'){
$filesfound=true;