Sitelet https://github.com/phpredis/phpredis/issues/1156#top
Skip to content

Double to string conversion error on 3.1.0 and 3.1.2, php5.6 #1156

Description

@TrystanLea

First thankyou for the great work you do on phpredis! We use it as part of our open source energy monitoring software emoncms. http://github.com/emoncms/emoncms/

After upgrading to phpredis-3.1.0 and 3.1.2 we have encountered a problem with rounding of numbers. The primary target system for testing so far has been a raspberrypi system with php5.6. E.g:

<?php
$redis = new Redis();
$connected = $redis->connect("localhost");
$redis->set("test:kwh1",10004.307044278);
print $redis->get("test:kwh1");

returned

10004.3

On version 3.0.0 and 2.2.8 it returned:

10004.307044278

Our full thread trying to pin point this issue can be found here if its of interest:
emoncms/emoncms#660

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions