fix module name finish % pandora_enterprise#8570

This commit is contained in:
Daniel Barbero Martin 2022-02-14 08:55:14 +01:00
parent f4ac71eb31
commit bc9bb070df
2 changed files with 5 additions and 2 deletions

View File

@ -710,7 +710,7 @@ switch ($activeTab) {
$id_module = $agent->searchModules( $id_module = $agent->searchModules(
['nombre' => $mod], ['nombre' => $mod],
1 1
)->id_agente_modulo(); )->toArray();
if (empty($id_module) === true) { if (empty($id_module) === true) {
continue; continue;

View File

@ -578,7 +578,10 @@ class Agent extends Entity
} else { } else {
// Search in db. // Search in db.
$return = Module::search($filter, $limit); $return = Module::search($filter, $limit);
if (is_array($return) === false) {
if (is_array($return) === false
&& is_object($return) === false
) {
return []; return [];
} }