mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Workaround for storage bigint (#9049)
Fix is to use mysqlnd driver instead of mysqli.
This commit is contained in:
committed by
Neil Lathwood
parent
1e55601409
commit
2e3aef6929
@@ -36,7 +36,8 @@ foreach (dbFetchRows('SELECT * FROM storage WHERE device_id = ?', array($device[
|
||||
$tags = compact('mib', 'descr', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'storage', $tags, $fields);
|
||||
|
||||
$update = dbUpdate(array('storage_used' => $storage['used'], 'storage_free' => $storage['free'], 'storage_size' => $storage['size'], 'storage_units' => $storage['units'], 'storage_perc' => $percent), 'storage', '`storage_id` = ?', array($storage['storage_id']));
|
||||
// NOTE: casting to string for mysqli bug (fixed by mysqlnd)
|
||||
$update = dbUpdate(array('storage_used' => (string)$storage['used'], 'storage_free' => (string)$storage['free'], 'storage_size' => (string)$storage['size'], 'storage_units' => $storage['units'], 'storage_perc' => $percent), 'storage', '`storage_id` = ?', array($storage['storage_id']));
|
||||
|
||||
echo "\n";
|
||||
}//end foreach
|
||||
|
Reference in New Issue
Block a user