Avoid More Warnings

This commit is contained in:
seiichiro 2022-01-11 16:52:11 +01:00
parent 09918ad666
commit 1e649ab8af

View file

@ -37,9 +37,11 @@ if (isset($_SESSION['files'])
$files = $_SESSION['files']; $files = $_SESSION['files'];
} else { } else {
$tmpdirs = glob(Helpers::end_dir($imagedir.$dir).'*' , GLOB_ONLYDIR); $tmpdirs = glob(Helpers::end_dir($imagedir.$dir).'*' , GLOB_ONLYDIR);
if (!empty($tmpdirs)) {
foreach ($tmpdirs as $tmpdir) foreach ($tmpdirs as $tmpdir)
$dirs[] = basename($tmpdir); $dirs[] = basename($tmpdir);
$rmdirs = $dirs; $rmdirs = $dirs;
}
$rmdirs[] = '.'; $rmdirs[] = '.';
$rmdirs[] = '..'; $rmdirs[] = '..';
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs); $files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);