Browse Source

explicitely initialize $virtualserver_label_values

otherwise multiple virtualservers get appended and the labels are wrong
master
lub 1 year ago
parent
commit
f762b81808
  1. 2
      src/metrics.php

2
src/metrics.php

@ -40,6 +40,8 @@ try {
return is_object($info_raw) ? $info_raw->toString() : $info_raw;
}, $virtualserver->getInfo());
// initialize with an empty array
$virtualserver_label_values = [];
// fill $virtualserver_label_values
foreach($virtualserver_label_keys as $virtualserver_label_key) {
$virtualserver_label_values[] = $infos[$virtualserver_label_key];

Loading…
Cancel
Save