From 891a6705d8c2b2b296010bcef1c3d392b4398f8b Mon Sep 17 00:00:00 2001 From: Jamie Hall Date: Wed, 29 Jul 2015 10:19:34 +0200 Subject: [PATCH] Updated Point.php to stop converting value to float Converting a value to a float causes a conflict "field type conflict: input field "value" on measurement "datapoints" is type int64, already exists as type float". For example, If i send 2.01, it works, if I send 2.00, it converts it into 2 and then Influxdb treats it as an integer. --- src/InfluxDB/Point.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InfluxDB/Point.php b/src/InfluxDB/Point.php index 59d3320866..cd757e209b 100644 --- a/src/InfluxDB/Point.php +++ b/src/InfluxDB/Point.php @@ -58,7 +58,7 @@ class Point $this->fields = $additionalFields; if ($value) { - $this->fields['value'] = (float) $value; + $this->fields['value'] = $value; } if ($timestamp && !$this->isValidTimeStamp($timestamp)) {