tags 563955 + patch quit 2011/2/17 Teodor MICU <mteo...@gmail.com>: > Unfortunately the patch that fixed this problem was lost during > upgrade to v0.8.7g.
I've just replaced "sizeof" with "!empty" on those two occurrences of "local_data_id" and I get this (kind of) expected message: | Created graph: PRO-R5K08 - CPU load (2 processors) | ERROR: no Data Source associated. Check Template Thanks
--- /usr/share/cacti/site/graphs_new.php_0.8.7g-1 2010-07-09 16:33:46.000000000 -0600 +++ /usr/share/cacti/site/graphs_new.php 2011-02-17 08:45:10.000000000 -0700 @@ -198,7 +198,7 @@ debug_log_insert("new_graphs", "Created graph: " . get_graph_title($return_array["local_graph_id"])); /* lastly push host-specific information to our data sources */ - if (sizeof($return_array["local_data_id"])) { # we expect at least one data source associated + if (!empty($return_array["local_data_id"])) { # we expect at least one data source associated foreach($return_array["local_data_id"] as $item) { push_out_host($_POST["host_id"], $item); } @@ -214,7 +214,7 @@ debug_log_insert("new_graphs", "Created graph: " . get_graph_title($return_array["local_graph_id"])); /* lastly push host-specific information to our data sources */ - if (sizeof($return_array["local_data_id"])) { # we expect at least one data source associated + if (!empty($return_array["local_data_id"])) { # we expect at least one data source associated foreach($return_array["local_data_id"] as $item) { push_out_host($_POST["host_id"], $item); }