summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/index.php b/index.php
index 87b0845..bb2418f 100644
--- a/index.php
+++ b/index.php
@@ -18,7 +18,12 @@ function find_projects(string $path, array $projects = []): array {
$projects[] = $path;
}
else {
- if (count(array_intersect(scandir($path), ["HEAD", "objects", "refs"])) == 3) {
+ $scan = @scandir($path);
+ if (! $scan) {
+ return $projects;
+ }
+
+ if (count(array_intersect($scan, ["HEAD", "objects", "refs"])) == 3) {
$projects[] = $path;
}
else {