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'];
} else {
$tmpdirs = glob(Helpers::end_dir($imagedir.$dir).'*' , GLOB_ONLYDIR);
foreach ($tmpdirs as $tmpdir)
$dirs[] = basename($tmpdir);
$rmdirs = $dirs;
if (!empty($tmpdirs)) {
foreach ($tmpdirs as $tmpdir)
$dirs[] = basename($tmpdir);
$rmdirs = $dirs;
}
$rmdirs[] = '.';
$rmdirs[] = '..';
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);