|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-09-05 10:55 UTC] koubel at seznam dot cz
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
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