From cd575dd5f45ddaa0871b31c36c46c675b484196f Mon Sep 17 00:00:00 2001 From: Matthias Viehweger Date: Sat, 20 Oct 2012 00:44:28 +0200 Subject: explicitely defined undefined variables this should keep the error.log clean --- inc/collectd.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/collectd.inc.php') diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php index 3aef6b8..3467667 100644 --- a/inc/collectd.inc.php +++ b/inc/collectd.inc.php @@ -130,10 +130,10 @@ function group_plugindata($plugindata) { function plugin_sort($data) { foreach ($data as $key => $row) { - $pi[$key] = $row['pi']; - $c[$key] = $row['c']; - $ti[$key] = $row['ti']; - $t[$key] = $row['t']; + $pi[$key] = (isset($row['pi'])) ? $row['pi'] : null; + $c[$key] = (isset($row['c'])) ? $row['c'] : null; + $ti[$key] = (isset($row['ti'])) ? $row['ti'] : null; + $t[$key] = (isset($row['t'])) ? $row['t'] : null; } array_multisort($c, SORT_ASC, $pi, SORT_ASC, $t, SORT_ASC, $ti, SORT_ASC, $data); -- cgit v1.1