Skip to content

Commit 7237b7a

Browse files
committed
Avoid error on misconfigured autoloading
1 parent 7150bba commit 7237b7a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/PHPFUI/InstaDoc/NamespaceTree.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,14 @@ public static function addNamespace(string $namespace, string $directory, bool $
7474
$node = self::findNamespace($namespace);
7575
$node->localGit = $localGit;
7676

77-
$iterator = new \DirectoryIterator($directory);
77+
try
78+
{
79+
$iterator = new \DirectoryIterator($directory);
80+
}
81+
catch (\Throwable $e)
82+
{
83+
$iterator = [];
84+
}
7885

7986
foreach ($iterator as $fileinfo)
8087
{

0 commit comments

Comments
 (0)