PHP Warning: Division by zero in .../cacti/httpdocs/lib/graph_export.php on line 629
PHP Warning: Division by zero in .../cacti/httpdocs/lib/graph_export.php on line 634
The corresponding bit in that file is:
Code: Select all
/* main graph page html */
fwrite($fp_index, "<td align='center' width='" . round(100 / $classic_columns,0) . "%'><a href='graph_" . $graph["local_graph_id"] . ".html'><img src='graphs/thumb_" . $graph["local_graph_id"] . ".png' border='0' alt='" . $graph["title_cache"] . "'></a></td>\n");
$i++;
$k++;
if ((($i % $classic_columns) == 0) && ($k < count($graphs))) {
fwrite($fp_index, "</tr><tr>");
}
}
I set a hard value for the first part and commented out the later and everything resumed to normal yet I have no idea what impact I made on anything else. Here is my resulted change.
Code: Select all
/* main graph page html */
fwrite($fp_index, "<td align='center' width='500px'><a href='graph_" . $graph["local_graph_id"] . ".html'><img src='graphs/thumb_" . $graph["local_graph_id"] . ".png' border='0' alt='" . $graph["title_cache"] . "'></a></td>\n");
$i++;
$k++;
/*if ((($i % $classic_columns) == 0) && ($k < count($graphs))) { */
/* fwrite($fp_index, "</tr><tr>"); */
/*} */
}
I'm hoping someone can give me a better fix for this and even pass it on for a fix in a later version.
Thank you.