[Wed Jan 15 09:31:45.938985 2025] [php:warn] [pid 1506437] [client 1.2.3.4:8595] PHP Warning: Undefined variable $name in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php on line 320, referer: https://srvnagios.domain.local/nagiosxi/includes/components/nagiosbpi/index.php
[Wed Jan 15 09:31:45.939062 2025] [php:error] [pid 1506437] [client 1.2.3.4:8595] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php:320\nStack trace:\n#0 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php(320): array_map()\n#1 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php(254): create_option_list()\n#2 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/bpi_commands.php(75): build_form()\n#3 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/bpi_page_router.php(107): handle_add_command()\n#4 /usr/local/nagiosxi/html/includes/components/nagiosbpi/index.php(179): bpi_page_router()\n#5 {main}\n thrown in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php on line 320, referer: https://srvnagios.domain.local/nagiosxi/includes/components/nagiosbpi/index.php
What is wrong here? Nagios XI 2024R1.3.2 on Ubuntu 24.04.1
[Wed Jan 15 09:31:45.938985 2025] [php:warn] [pid 1506437] [client 1.2.3.4:8595] PHP Warning: Undefined variable $name in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php on line 320, referer: https://srvnagios.domain.local/nagiosxi/includes/components/nagiosbpi/index.php
[Wed Jan 15 09:31:45.939062 2025] [php:error] [pid 1506437] [client 1.2.3.4:8595] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php:320\nStack trace:\n#0 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php(320): array_map()\n#1 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php(254): create_option_list()\n#2 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/bpi_commands.php(75): build_form()\n#3 /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/bpi_page_router.php(107): handle_add_command()\n#4 /usr/local/nagiosxi/html/includes/components/nagiosbpi/index.php(179): bpi_page_router()\n#5 {main}\n thrown in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/build_form.inc.php on line 320, referer: https://srvnagios.domain.local/nagiosxi/includes/components/nagiosbpi/index.php
What is wrong here? Nagios XI 2024R1.3.2 on Ubuntu 24.04.1
Looks like we are running into a php issue here. With newer version of PHP things have been deprecated and error handling has been handled differently since 8+ so it looks like we missed this error here when adding support for Ubuntu 24. I'll file an issue and look into a fix. If you are comfortable modifying lines of code I can give you the lines to change otherwise the fix will be in one of the upcoming releases. For the changelog line when it goes in will be tagged under the fixed section with [GL:XI#1441] in the changelog.
riahc3 wrote: ↑Mon Jan 27, 2025 5:15 am
A new version was released on Jan 22 and this fix is NOT included.
Why?
Well I can't go too in-depth with all the decisions made in our development process but I can give some insight. With development cycles at some point they reach a point where the version that we are going to push has to go into a QA cycle for testing. This is done so we can hopefully catch any bugs or weird interactions with changes that we have made. While we are in these QA cycles generally any new changes, with some exceptions, are put into the next version after what is currently in the QA cycle. That being said you can keep an eye on the changelog for this specific change with the issue number given above. It may not go in the next release either due to the QA cycles, but luckily the change is easy enough to make manually if you are willing to copy the code in yourself.