mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
check for extension dir before reading contents
This commit is contained in:
parent
a5c27190c1
commit
9b643fa700
|
@ -76,16 +76,18 @@ class SeedDMS_Extension_Mgr {
|
|||
|
||||
function getExtensions() { /* {{{ */
|
||||
$extensions = array();
|
||||
$handle = opendir($this->extdir);
|
||||
while ($entry = readdir($handle) ) {
|
||||
if ($entry == ".." || $entry == ".")
|
||||
continue;
|
||||
else if (is_dir($this->extdir ."/". $entry))
|
||||
array_push($extensions, $entry);
|
||||
}
|
||||
closedir($handle);
|
||||
if(file_exists($this->extdir)) {
|
||||
$handle = opendir($this->extdir);
|
||||
while ($entry = readdir($handle) ) {
|
||||
if ($entry == ".." || $entry == ".")
|
||||
continue;
|
||||
else if (is_dir($this->extdir ."/". $entry))
|
||||
array_push($extensions, $entry);
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
asort($extensions);
|
||||
asort($extensions);
|
||||
}
|
||||
return $extensions;
|
||||
} /* }}} */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user