diff --git a/CHANGELOG b/CHANGELOG index 0730e727d4..00bdf70895 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/lib/functions.php b/lib/functions.php index 73d5c0de29..2015b05659 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -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) {