Skip to content

Improve compatibility for Error constants under PHP 8.4 #5986

@paulgevers

Description

@paulgevers

cacti 1.2.28 logs lots of php errors with php8.4

Debian is in the process of migrating to php8.4. Running the cacti test suite fails with PHP errors in cacti.log.

To Reproduce

Steps to reproduce the behavior:

  1. Install php version 8.4 and use it to serve the web site.

  2. Open cacti in a web browser.

  3. See the following in the cacti.log:

2024-12-12 12:37:23 - ERROR PHP Unknown Error: Constant E_STRICT is deprecated in file: /usr/share/cacti/site/include/global_arrays.php  on line: 479
2024-12-12 12:37:23 - CMDPHP PHP ERROR Backtrace:  (/index.php[25]:include(), /include/auth.php[27]:require_once(), /include/global.php[550]:include_once(), /include/global_arrays.php[479]:CactiErrorHandler())

Expected behavior

Cacti doesn't log errors.

Desktop

  • OS: Debian (Linux)

  • Browser: wget

  • Version 1.24.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourconfirmedBug is confirm by dev team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions