php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59895 RRDUpdater::update not working with multiple DS
Submitted: 2011-08-17 04:25 UTC Modified: 2011-09-05 10:55 UTC
From: henrikolsen at gmail dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.04.1 LTS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: henrikolsen at gmail dot com
New email:
PHP Version: OS:

 

 [2011-08-17 04:25 UTC] henrikolsen at gmail dot com
Description:
------------
When giving multiple key/value pairs in the values argument to 
RRFUpdater::update, it seems only the first pair is actually 
being set.

Reproduce code:
---------------
<?php
$rrdFile = '/tmp/test.rrd';

$creator = new RRDCreator($rrdFile, 1313557200, 3600);
$creator->addDataSource("speed:GAUGE:3600:U:U");
$creator->addDataSource("weight:GAUGE:3600:U:U");
$creator->addArchive("AVERAGE:0.5:1:24");
$creator->save();

$updator = new RRDUpdater($rrdFile);
$updator->update(array('speed' => 42, 'weight' => 18), 1313560800);

rm /tmp/test.rrd; php /tmp/rrd.php; rrdtool fetch /tmp/test.rrd AVERAGE -s 1313557200 -e 1313557200
                          speed              weight

1313560800: 4.2000000000e+01 -nan

Expected result:
----------------
I expect both key/value pairs set (speed to 42 and weight to 
18).

Actual result:
--------------
Only the first key/value pair is set.

rm /tmp/test.rrd; php /tmp/rrd.php; rrdtool fetch 
/tmp/test.rrd AVERAGE -s 1313557200 -e 1313557200
                          speed              weight

1313560800: 4.2000000000e+01 -nan

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-05 10:55 UTC] koubel at seznam dot cz
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC