Skip to content

Commit

Permalink
Resolving Issue #2589
Browse files Browse the repository at this point in the history
DSStats throws errors when RRDfile has not been created
  • Loading branch information
cigamit committed Apr 17, 2019
1 parent 02d68f3 commit 1f020e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Cacti CHANGELOG

1.2.4
-issue#2589: DSStats throws errors when RRDfile has not been created
-issue#2590: Language selection is not working as expected
-issue#2592: Display graphs from this aggregate can not work
-issue#2593: Can not migrate aggregate to use a template
Expand Down
14 changes: 8 additions & 6 deletions lib/graph_variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ function nth_percentile_fetch_statistics($percentile, &$local_data_ids, &$fetch_
$asum_array = array();

foreach ($local_data_ids as $ldi => $data_source_name) {
if (isset($fetch_array[$ldi]['data_source_names'])) {
if (cacti_sizeof($fetch_array[$ldi]['data_source_names'])) {
foreach ($fetch_array[$ldi]['data_source_names'] as $index => $ds_name) {
foreach ($fetch_array[$ldi]['values'][$index] as $timestamp => $data) {
if (isset($asum_array[$ds_name][$timestamp])) {
$asum_array[$ds_name][$timestamp] += $data;
} else {
$asum_array[$ds_name][$timestamp] = $data;
if (cacti_sizeof($fetch_array[$ldi]['values'][$index])) {
foreach ($fetch_array[$ldi]['values'][$index] as $timestamp => $data) {
if (isset($asum_array[$ds_name][$timestamp])) {
$asum_array[$ds_name][$timestamp] += $data;
} else {
$asum_array[$ds_name][$timestamp] = $data;
}
}
}
}
Expand Down

0 comments on commit 1f020e9

Please sign in to comment.