check for plugins directory existence before scanning it

This commit is contained in:
steeffeen 2014-06-29 22:30:01 +02:00
parent d4c094498d
commit 897111feff

View File

@ -269,6 +269,9 @@ class PluginManager {
* @param string $directory
*/
public function loadPluginFiles($directory = '') {
if (!is_readable($directory) || !is_dir($directory)) {
return;
}
$pluginFiles = scandir($directory);
foreach ($pluginFiles as $pluginFile) {
if (stripos($pluginFile, '.') === 0) {