Skip to content

Commit

Permalink
Merge pull request #2 from fusioninventory/gsit9.5+fixNetworkSpeedSQL…
Browse files Browse the repository at this point in the history
…Error

Fix SQL error on networkcard because speed is too high
  • Loading branch information
ddurieux authored Feb 12, 2023
2 parents cf4136a + b3ddd86 commit 5260151
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/formatconvert.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5260151

Please sign in to comment.