Public bug reported:
Cacti fails to show many graphs, and also has problems reindexing.
The error given is:
sizeof(): Parameter must be an array or an object that implements Countable in
/usr/share/cacti/site/lib/utility.php on line 541
Fix is by patch:
diff --git a/lib/utility.php b/tmp/utility.php
index 6488d98..306e6e4 100644
--- a/lib/utility.php
+++ b/tmp/utility.php
@@ -459,7 +459,7 @@ function push_out_data_input_method($data_input_id) {
*/
function poller_update_poller_cache_from_buffer($local_data_ids,
&$poller_items) {
/* set all fields present value to 0, to mark the outliers when we are
all done */
- $ids = array();
+ $ids = '';
if (sizeof($local_data_ids)) {
$count = 0;
foreach($local_data_ids as $id) {
@@ -538,7 +538,7 @@ function
poller_update_poller_cache_from_buffer($local_data_ids, &$poller_items)
}
/* remove stale records FROM the poller cache */
- if (sizeof($ids)) {
+ if (strlen($ids)) {
db_execute("DELETE FROM poller_item WHERE present=0 AND
local_data_id IN ($ids)");
} else {
/* only handle explicitely given local_data_ids */
** Affects: ubuntu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1779401
Title:
Cacti 1.1.38 fails to display graphs and acts erratically
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1779401/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs