Skip to content

Undefined variable warning can appear when using 95th percentile graphs #3340

Description

@rprofijt

Describe the bug
After upgrading to 1.2.10 (from 1.1.38) we get these errors in the cacti log:

2020/03/11 11:28:24 - CMDPHP PHP ERROR NOTICE Backtrace: (/graph_json.php[159]:rrdtool_function_graph(), /lib/rrd.php[1586]:variable_nth_percentile(), /lib/graph_variables.php[449]:nth_percentile(), /lib/graph_variables.php[33]:rrdtool_function_stats(), /lib/graph_variables.php[140]:nth_percentile_fetch_statistics(), /lib/graph_variables.php[153]:CactiErrorHandler())
2020/03/11 11:28:24 - ERROR PHP NOTICE: Undefined index: values in file: /opt/cacti/cacti-prod/lib/graph_variables.php on line: 153

To Reproduce
Steps to reproduce the behavior:

Open/render a graph with 95th percentile and nan values.

Expected behavior
Render the empty broken graph without PHP errors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions