diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-05-26 14:33:10 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-05-26 14:33:10 +0200 |
commit | 24360fd19182cad5ed29d10bb47c208bc195c232 (patch) | |
tree | ceb0df11e708ff35a81c9115a2b065e0f44ffb7c | |
parent | 9017dcd0fd904ecdf54b75ad39588db4f2e91ea6 (diff) | |
download | volse-hubzilla-24360fd19182cad5ed29d10bb47c208bc195c232.tar.gz volse-hubzilla-24360fd19182cad5ed29d10bb47c208bc195c232.tar.bz2 volse-hubzilla-24360fd19182cad5ed29d10bb47c208bc195c232.zip |
check if $addonDir is a dir to silence warning if it does not exist
-rw-r--r-- | Zotlabs/Module/Admin.php | 12 |
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; } |