Skip to content

Commit

Permalink
fixed a bug with graph debug and graphs not showing
Browse files Browse the repository at this point in the history
 Call to undefined function rrd_substitute_device_query_data() in //lib/rrd.php on line 1951, referer: http://cacti/graphs.php?action=graph_edit&id=19
  • Loading branch information
micke2k committed Apr 1, 2016
1 parent 3a87706 commit 330802a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rrd.php
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
case GRAPH_ITEM_TYPE_COMMENT:
if (!isset($graph_data_array['graph_nolegend'])) {
# perform variable substitution first (in case this will yield an empty results or brings command injection problems)
$comment_arg = rrd_substitute_device_query_data($graph_variables['text_format'][$graph_item_id], $graph, $graph_item);
$comment_arg = rrd_substitute_host_query_data($graph_variables['text_format'][$graph_item_id], $graph, $graph_item);
# next, compute the argument of the COMMENT statement and perform injection counter measures
if (trim($comment_arg) == '') { # an empty COMMENT must be treated with care
$comment_arg = cacti_escapeshellarg(' ' . $hardreturn[$graph_item_id]);
Expand Down Expand Up @@ -1948,7 +1948,7 @@ function rrdtool_function_graph($local_graph_id, $rra_id, $graph_data_array, $rr
$graph_variables['value'][$graph_item_id] = str_replace(':', '\:', $graph_variables['value'][$graph_item_id]); /* escape colons */

/* perform variable substitution; if this does not return a number, rrdtool will FAIL! */
$substitute = rrd_substitute_device_query_data($graph_variables['value'][$graph_item_id], $graph, $graph_item);
$substitute = rrd_substitute_host_query_data($graph_variables['value'][$graph_item_id], $graph, $graph_item);

if (is_numeric($substitute)) {
$graph_variables['value'][$graph_item_id] = $substitute;
Expand Down

0 comments on commit 330802a

Please sign in to comment.