Skip to content

Commit

Permalink
Resolved two corners cases related to #2690
Browse files Browse the repository at this point in the history
Thse two issues were discovered by user new to Cacti.
  • Loading branch information
cigamit committed May 19, 2019
1 parent c8d3b0d commit af945e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions graphs_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function graphs() {
} else {
$header = __('New Graphs for [ All Devices ]');
$host['id'] = -1;
$host['host_template_id'] = 0;
}
} else {
$host['id'] = 0;
Expand Down
6 changes: 4 additions & 2 deletions lib/utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,12 @@ function push_out_host($host_id, $local_data_id = 0, $data_template_id = 0) {

if (cacti_sizeof($hosts)) {
foreach($hosts as $host) {
$poller_ids[$host['poller_id']] = $host['poller_id'];
if (isset($host['poller_id'])) {
$poller_ids[$host['poller_id']] = $host['poller_id'];
}
}

if (cacti_sizeof($poller_ids > 1)) {
if (cacti_sizeof($poller_ids) > 1) {
cacti_log('WARNING: function push_out_host() discovered more than a single host', false, 'POLLER');
}
}
Expand Down

0 comments on commit af945e0

Please sign in to comment.