Fix: check if directory exists
This commit is contained in:
parent
2e595643f5
commit
0ac656b218
@ -68,6 +68,9 @@ $i = 0;
|
||||
|
||||
foreach($interfaces->dir as $dir)
|
||||
{
|
||||
// Check if directory exists
|
||||
if (!is_dir($dir)) continue;
|
||||
|
||||
$handle=opendir($dir);
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
|
||||
@ -63,7 +63,7 @@ class Interfaces
|
||||
dol_syslog('interface::run_triggers was called with wrong parameters object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf), LOG_WARNING);
|
||||
}
|
||||
|
||||
// Load all directory
|
||||
// Load the list of directories containing triggers
|
||||
$this->getModulesTriggers();
|
||||
|
||||
foreach($this->dir as $dir)
|
||||
@ -157,8 +157,8 @@ class Interfaces
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return list of modules contains triggers.
|
||||
* \return array List of module name.
|
||||
* \brief Returns the list of directories containing triggers.
|
||||
* \return array List of directories.
|
||||
*/
|
||||
function getModulesTriggers()
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user