Skip to content

Commit

Permalink
fix best CF selection
Browse files Browse the repository at this point in the history
#4557 - use reset to return the first element.
  • Loading branch information
browniebraun committed Feb 18, 2022
1 parent b765141 commit 15adc29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Cacti CHANGELOG
-issue#4551: PHP DEPRECATED errors in 8.1
-issue#4552: Form error message not cleared before rendering forms leading to false error messages
-issue#4554: PHP 8.1 Causing Automation Deprecation Errors
-issue#4557: Undefined index in graph debug mode.
-feature: Expose hidden Language Translation setting l10n_language_handler
-feature: Allow a Device to be a part of a Report outside of a Tree
-feature: Allow Basic Authentication to display customer login failed message
Expand Down
2 changes: 1 addition & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ function generate_graph_best_cf($local_data_id, $requested_cf, $ds_step = 60) {
/* workaround until we have RRA presets in 0.8.8 */
/* check through the cf's and get the best */
/* if none was found, take the first */
$best_cf = $avail_cf_functions[1];
$best_cf = reset($avail_cf_functions);

foreach($avail_cf_functions as $cf) {
if ($cf == $requested_cf) {
Expand Down

0 comments on commit 15adc29

Please sign in to comment.