aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMatthias Viehweger2012-10-20 00:44:28 +0200
committerMatthias Viehweger2012-10-20 00:44:28 +0200
commitcd575dd5f45ddaa0871b31c36c46c675b484196f (patch)
tree7ad692211674402ef89b1be5180f6f8b71cca114
parentchange whitespace, indentation or line-breaks (diff)
downloadapt-panopticon_cgp-cd575dd5f45ddaa0871b31c36c46c675b484196f.zip
apt-panopticon_cgp-cd575dd5f45ddaa0871b31c36c46c675b484196f.tar.gz
apt-panopticon_cgp-cd575dd5f45ddaa0871b31c36c46c675b484196f.tar.bz2
apt-panopticon_cgp-cd575dd5f45ddaa0871b31c36c46c675b484196f.tar.xz
explicitely defined undefined variables
this should keep the error.log clean
-rw-r--r--inc/collectd.inc.php8
-rw-r--r--type/Default.class.php3
-rw-r--r--type/GenericStacked.class.php3
3 files changed, 10 insertions, 4 deletions
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) {
130 130
131function plugin_sort($data) { 131function plugin_sort($data) {
132 foreach ($data as $key => $row) { 132 foreach ($data as $key => $row) {
133 $pi[$key] = $row['pi']; 133 $pi[$key] = (isset($row['pi'])) ? $row['pi'] : null;
134 $c[$key] = $row['c']; 134 $c[$key] = (isset($row['c'])) ? $row['c'] : null;
135 $ti[$key] = $row['ti']; 135 $ti[$key] = (isset($row['ti'])) ? $row['ti'] : null;
136 $t[$key] = $row['t']; 136 $t[$key] = (isset($row['t'])) ? $row['t'] : null;
137 } 137 }
138 138
139 array_multisort($c, SORT_ASC, $pi, SORT_ASC, $t, SORT_ASC, $ti, SORT_ASC, $data); 139 array_multisort($c, SORT_ASC, $pi, SORT_ASC, $t, SORT_ASC, $ti, SORT_ASC, $data);
diff --git a/type/Default.class.php b/type/Default.class.php
index 00ef0e4..0b6601e 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -243,6 +243,9 @@ class Type_Default {
243 243
244 if ($this->scale) 244 if ($this->scale)
245 $raw = '_raw'; 245 $raw = '_raw';
246 else
247 $raw = null;
248
246 $i=0; 249 $i=0;
247 foreach ($this->tinstances as $tinstance) { 250 foreach ($this->tinstances as $tinstance) {
248 foreach ($this->data_sources as $ds) { 251 foreach ($this->data_sources as $ds) {
diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php
index d1da9ec..f306532 100644
--- a/type/GenericStacked.class.php
+++ b/type/GenericStacked.class.php
@@ -11,6 +11,9 @@ class Type_GenericStacked extends Type_Default {
11 11
12 if ($this->scale) 12 if ($this->scale)
13 $raw = '_raw'; 13 $raw = '_raw';
14 else
15 $raw = null;
16
14 $i=0; 17 $i=0;
15 foreach ($this->tinstances as $tinstance) { 18 foreach ($this->tinstances as $tinstance) {
16 foreach ($this->data_sources as $ds) { 19 foreach ($this->data_sources as $ds) {