Skip to content

Commit

Permalink
QA: Another attempt to fix #5483
Browse files Browse the repository at this point in the history
This should get closer to a solution.
  • Loading branch information
TheWitness committed Sep 22, 2023
1 parent 865db06 commit 3801e53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/data_query.php
Expand Up @@ -1375,7 +1375,11 @@ function query_snmp_host($host_id, $snmp_query_id) {
// Check for an IPv6 Address or Hex String
$parts = explode('.', $parse_value);
foreach($parts as $idx => $part) {
$parts[$idx] = substr(strtoupper('00' . dechex($part)), -2);
if (is_numeric($part)) {
$parts[$idx] = substr(strtoupper('00' . dechex($part)), -2);
} else {
$parts[$idx] = substr(strtoupper('00' . $part), -2);
}

if ($idx % 2 == 0 && $idx > 0) {
$ip_value .= ':' . $parts[$idx];
Expand Down

0 comments on commit 3801e53

Please sign in to comment.