#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,10 +1386,14 @@ if ($id_agente) {
if (strpos($agent['agent_version'], '(')) { if (strpos($agent['agent_version'], '(')) {
$agent_version = (int) explode('.', explode('(', $agent['agent_version'])[0])[2]; $agent_version = (int) explode('.', explode('(', $agent['agent_version'])[0])[2];
} else { } 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]; $agent_version = (int) explode('.', explode('build', $agent['agent_version'])[0])[2];
} else { } else {
$agent_version = $agent['agent_version']; if (strpos($agent['agent_version'], '.')) {
$agent_version = (int) explode('.', $agent['agent_version'])[2];
} else {
$agent_version = $agent['agent_version'];
}
} }
} }
} }