From b3ddd8661437e7172b02e90a7237bdaeaaaad41d Mon Sep 17 00:00:00 2001 From: David Durieux Date: Sun, 12 Feb 2023 17:14:23 +0100 Subject: [PATCH] Fix SQL error on networkcard because speed is too high --- inc/formatconvert.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/formatconvert.class.php b/inc/formatconvert.class.php index fd2783743..b91123610 100644 --- a/inc/formatconvert.class.php +++ b/inc/formatconvert.class.php @@ -904,6 +904,10 @@ static function computerInventoryTransformation($array) { if ($array_tmp['speed'] > 100000) { $array_tmp['speed'] = $array_tmp['speed'] / 1000000; } + // some cases we have very too high speed (9223372036854775807) + if ($array_tmp['speed'] > 99999999999) { + $array_tmp['speed'] = 0; + } } else { $array_tmp['speed'] = 0; }