Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct issues with Heartbeat definitions under PHP 8.x #4693

Closed
manhvu1997 opened this issue Apr 10, 2022 · 3 comments
Closed

Correct issues with Heartbeat definitions under PHP 8.x #4693

manhvu1997 opened this issue Apr 10, 2022 · 3 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team PHP8 Issue related to PHP8 resolved A fixed issue

Comments

@manhvu1997
Copy link

Describe the bug

I install cacti 1.2.20 with php8.1 on ubuntu OS. However, I faced with the error:
2022-04-09 20:56:17 - CMDPHP PHP ERROR Backtrace: (/logout.php[26]:include(), /include/auth.php[27]:require_once(), /include/global.php[517]:include_once(), /include/global_arrays.php[697]:__(), /include/global_languages.php[507]:CactiErrorHandler())
2022-04-09 20:56:17 - ERROR PHP : Implicit conversion from float 5.5 to int loses precision in file: /var/www/html/cacti/include/global_languages.php on line: 516
Can you help me fix the bug above ?

ảnh

@manhvu1997 manhvu1997 added bug Undesired behaviour unverified Some days we don't have a clue labels Apr 10, 2022
@netniV netniV changed the title Cacti error with php8.1 Heartbeat definitions can cause issues under PHP 8 Apr 11, 2022
netniV added a commit that referenced this issue Apr 11, 2022
Due to specifying 5.5 minutes, format string must match
a float not a string or decimal under PHP 8.1
@netniV netniV added resolved A fixed issue confirmed Bug is confirm by dev team PHP8 Issue related to PHP8 and removed unverified Some days we don't have a clue labels Apr 11, 2022
@netniV
Copy link
Member

netniV commented Apr 11, 2022

Simply change the above line and it should resolve the issue.

@netniV netniV closed this as completed Apr 11, 2022
@netniV netniV changed the title Heartbeat definitions can cause issues under PHP 8 Correct issues with Heartbeat definitions under PHP 8.x May 15, 2022
@fda77
Copy link

fda77 commented Jul 17, 2022

This fix does not work with Cacti 1.2.21 and PHP 8.1.8 on Fedora 36
As mentioned here, __('%s Minutes', '5.5') resolved it for me

@TheWitness
Copy link
Member

This has been fixed in the pending 1.2.22.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team PHP8 Issue related to PHP8 resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants