Added not init state if there are no initialized modules

This commit is contained in:
Daniel Maya 2017-03-28 11:59:30 +02:00
parent f81998b294
commit 967b43061d

View File

@ -1739,6 +1739,10 @@ function agents_get_status($id_agent = 0, $noACLs = false) {
} }
} }
if (!isset($modules) || empty($modules) || count($modules) == 0) {
return AGENT_MODULE_STATUS_NOT_INIT;
}
$modules_status = array(); $modules_status = array();
$modules_async = 0; $modules_async = 0;
foreach ($modules as $module) { foreach ($modules as $module) {