Catch Undefined Variables in Directory Scan
This commit is contained in:
parent
f73f34e775
commit
51df5547cb
1 changed files with 2 additions and 2 deletions
|
@ -74,8 +74,8 @@ if (isset($_SESSION[$cdir])
|
|||
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);
|
||||
// Filter Unsupported Files
|
||||
$files = array_values(preg_grep('/.*\.(?!(webm|sh)).*/i', $files));
|
||||
$_SESSION[$cdir]['f'] = $files;
|
||||
$_SESSION[$cdir]['d'] = $dirs;
|
||||
$_SESSION[$cdir]['f'] = isset($files) ? $files : null;
|
||||
$_SESSION[$cdir]['d'] = isset($dirs) ? $dirs : null;
|
||||
$_SESSION[$cdir]['t'] = time();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue