You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Background / thanks]
I am in the process of packaging Cacti 1.2.19 and found that you adopted my CI test. Thanks for doing that.
[Issue]
I ran tests/tools/check_all_pages.sh (after minor tweaks for Debian specifics) on a fresh installed cacti in a fresh container and it fails with:
ERROR: Fail - Unexpected output in /usr/share/cacti/site/log/cacti.log:
2021-11-21 08:18:55 - ERROR PHP WARNING: Division by zero in file: /usr/share/cacti/site/utilities.php on line: 2229
2021-11-21 08:18:55 - CMDPHP PHP ERROR WARNING Backtrace: (/utilities.php[84]:boost_display_run_status(), /utilities.php[2229]:CactiErrorHandler())
2021-11-21 08:18:55 - ERROR PHP WARNING: Division by zero in file: /usr/share/cacti/site/utilities.php on line: 2339
2021-11-21 08:18:55 - CMDPHP PHP ERROR WARNING Backtrace: (/utilities.php[84]:boost_display_run_status(), /utilities.php[2339]:CactiErrorHandler())
As this is a fresh install, I'm not surprised that $data_sources is zero. However, utilities.php#L2229 and utilities.php#L2239 unilaterally divide by the value.
As this obviously is a weird situation (no data_sources at all) I'm not sure if you want to properly fix this, but it would make the test simpler (I now added the error to the list of ignored errors).
To Reproduce
Steps to reproduce the behavior:
On a fresh install without any data sources run tests/tools/check_all_pages.sh
Expected behavior
check_all_pages.sh should pass.
Desktop (please complete the following information)
OS: Debian testing
wget
1.21.2
The text was updated successfully, but these errors were encountered:
netniV
changed the title
[1.2.19] Debian CI: "Division by zero in file: utilities.php"
Utilities view has calculation errors when there are no data sources
Nov 22, 2021
@majed17 that should be logged as a separate issue. Whilst they are all PHP 8 related, it is easier to track them individually. The USM generic may be something out of our hands though if it's in the core PHP libraries, all we would do is trap the error. There is a change we made to suppress PHP errors around SNMP-GET for that reason though I'm not sure if that's in 1.2.19 or not without searching.
Describe the bug
[Background / thanks]
I am in the process of packaging Cacti 1.2.19 and found that you adopted my CI test. Thanks for doing that.
[Issue]
I ran tests/tools/check_all_pages.sh (after minor tweaks for Debian specifics) on a fresh installed cacti in a fresh container and it fails with:
As this is a fresh install, I'm not surprised that
$data_sources
is zero. However, utilities.php#L2229 and utilities.php#L2239 unilaterally divide by the value.As this obviously is a weird situation (no data_sources at all) I'm not sure if you want to properly fix this, but it would make the test simpler (I now added the error to the list of ignored errors).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
check_all_pages.sh
should pass.Desktop (please complete the following information)
OS: Debian testing
wget
1.21.2
The text was updated successfully, but these errors were encountered: