check if $addonDir is a dir to silence warning if it does not exist
This commit is contained in:
parent
9017dcd0fd
commit
24360fd191
@ -1421,6 +1421,7 @@ class Admin extends \Zotlabs\Web\Controller {
|
|||||||
function listAddonRepos() {
|
function listAddonRepos() {
|
||||||
$addonrepos = [];
|
$addonrepos = [];
|
||||||
$addonDir = __DIR__ . '/../../extend/addon/';
|
$addonDir = __DIR__ . '/../../extend/addon/';
|
||||||
|
if(is_dir($addonDir)) {
|
||||||
if ($handle = opendir($addonDir)) {
|
if ($handle = opendir($addonDir)) {
|
||||||
while (false !== ($entry = readdir($handle))) {
|
while (false !== ($entry = readdir($handle))) {
|
||||||
if ($entry != "." && $entry != "..") {
|
if ($entry != "." && $entry != "..") {
|
||||||
@ -1429,6 +1430,7 @@ class Admin extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $addonrepos;
|
return $addonrepos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user