mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Always ensure value
This commit is contained in:
@@ -54,8 +54,10 @@ class Point
|
||||
}
|
||||
|
||||
$this->measurement = (string) $measurement;
|
||||
$this->tags = $tags;
|
||||
$this->fields = array_merge($additionalFields, array('value' => (float) $value));
|
||||
$this->tags = $tags;
|
||||
$this->fields = $additionalFields;
|
||||
|
||||
$this->fields['value'] = (float) $value;
|
||||
|
||||
if ($timestamp && !$this->isValidTimeStamp($timestamp)) {
|
||||
throw new DatabaseException(sprintf('%s is not a valid timestamp', $timestamp));
|
||||
@@ -113,11 +115,7 @@ class Point
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($timestamp <= PHP_INT_MAX) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($timestamp >= ~PHP_INT_MAX) {
|
||||
if ($timestamp <= PHP_INT_MAX && $timestamp >= ~PHP_INT_MAX) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user