Avoid one notice if the dataroot/lang dir doesn't exist.

This commit is contained in:
stronk7 2006-01-07 10:00:49 +00:00
parent 424cdc2613
commit 2412b5ab1b

View File

@ -5439,7 +5439,7 @@ function get_list_of_plugins($plugin='mod', $exclude='', $basedir='') {
} else {
$basedir = $basedir .'/'. $plugin;
}
if (filetype($basedir) == 'dir') {
if (file_exists($basedir) && filetype($basedir) == 'dir') {
$dirhandle = opendir($basedir);
while (false !== ($dir = readdir($dirhandle))) {
$firstchar = substr($dir, 0, 1);