Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thibaud-rohmer/PhotoShow
base: 77fa3df651
...
head fork: thibaud-rohmer/PhotoShow
compare: b624c14822
  • 4 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/classes/Menu.php
View
10 src/classes/Menu.php
@@ -156,6 +156,11 @@ public static function list_dirs($dir,$rec=false, $hidden=false){
/// Directory content
$dir_content = scandir($dir);
+
+ if (empty($dir_content)){
+ // Directory is empty or no right to read
+ return $list;
+ }
/// Check each content
foreach ($dir_content as $content){
@@ -195,6 +200,11 @@ public static function list_files($dir,$rec = false, $hidden = false, $stopatfir
/// Directory content
$dir_content = scandir($dir);
+
+ if (empty($dir_content)){
+ // Directory is empty or no right to read
+ return $list;
+ }
/// Check each content
foreach ($dir_content as $content){

No commit comments for this range

Something went wrong with that request. Please try again.