aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Admin.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php
index 172b109c8..8f15035d1 100644
--- a/Zotlabs/Module/Admin.php
+++ b/Zotlabs/Module/Admin.php
@@ -1421,13 +1421,15 @@ class Admin extends \Zotlabs\Web\Controller {
function listAddonRepos() {
$addonrepos = [];
$addonDir = __DIR__ . '/../../extend/addon/';
- if ($handle = opendir($addonDir)) {
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != "..") {
- $addonrepos[] = $entry;
+ if(is_dir($addonDir)) {
+ if ($handle = opendir($addonDir)) {
+ while (false !== ($entry = readdir($handle))) {
+ if ($entry != "." && $entry != "..") {
+ $addonrepos[] = $entry;
+ }
}
+ closedir($handle);
}
- closedir($handle);
}
return $addonrepos;
}