#12341 fix agent_version

This commit is contained in:
Jonathan 2023-11-30 11:43:54 +01:00
parent bac9d4b7a6
commit f600648cc0
1 changed files with 6 additions and 2 deletions

View File

@ -1386,13 +1386,17 @@ if ($id_agente) {
if (strpos($agent['agent_version'], '(')) {
$agent_version = (int) explode('.', explode('(', $agent['agent_version'])[0])[2];
} else {
if (strpos($agent['agent_version'], 'build')) {
if (strpos($agent['agent_version'], 'build') || strpos($agent['agent_version'], 'Build')) {
$agent_version = (int) explode('.', explode('build', $agent['agent_version'])[0])[2];
} else {
if (strpos($agent['agent_version'], '.')) {
$agent_version = (int) explode('.', $agent['agent_version'])[2];
} else {
$agent_version = $agent['agent_version'];
}
}
}
}
$update_module = (bool) get_parameter('update_module');
$create_module = (bool) get_parameter('create_module');