Describe the bug
Using the latest 1.2.x branch code after install there is an error in the cacti.log
The issue is in cacti/lib/import.php in function xml_to_data_input_method(). It can return an array, or a boolean. When it returns a boolean it triggers the error:
2026/05/07 05:26:20 - ERROR PHP ERROR: Uncaught TypeError: Unsupported operand types: array + bool in /opt/IBM/cacti/lib/import.php:242
Stack trace: #0 /opt/IBM/cacti/lib/rtm_functions.php(496): import_xml_data('<!-- $Id: 7978f...', false, 1)
#1 /opt/IBM/cacti/plugins/grid/import_default_templates.php(199): rtm_do_import('/opt/IBM/cacti/...')
#2 {main} thrown in file: /opt/IBM/cacti/lib/import.php on line: 242
To Reproduce
- Install the latest code from 1.2.x branch
- Check the logs
Expected behavior
No PHP errors in logs
Screenshots
2026/05/07 05:26:08 - PUSHOUT Child Started Process 1 with 1 hosts, from: 0
2026/05/07 05:26:20 - IMPORT ERROR: Refusing to import data input method '5036ba4f10baf24c1bd8ab0ed18bae82' -
input_string contains shell metacharacters
2026/05/07 05:26:20 - ERROR PHP ERROR: Uncaught TypeError: Unsupported operand types: array + bool in /opt/IBM/cacti/lib/import.php:242
Stack trace:
#0 /opt/IBM/cacti/lib/rtm_functions.php(496): import_xml_data('<!-- $Id: 7978f...', false, 1)
#1 /opt/IBM/cacti/plugins/grid/import_default_templates.php(199): rtm_do_import('/opt/IBM/cacti/...')
#2 {main} thrown in file: /opt/IBM/cacti/lib/import.php on line: 242
2026/05/07 05:26:20 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information)
- OS: RHEL 8.10
- PHP: 8.2.30
Additional context
Add any other context about the problem here.
Describe the bug
Using the latest 1.2.x branch code after install there is an error in the cacti.log
The issue is in
cacti/lib/import.phpin functionxml_to_data_input_method(). It can return an array, or a boolean. When it returns a boolean it triggers the error:To Reproduce
Expected behavior
No PHP errors in logs
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information)
Additional context
Add any other context about the problem here.