MantisBT: master-2.26 70905946

Author Committer Branch Timestamp Parent
dregad dregad master-2.26 2024-03-10 11:58 master-2.26 bff76ed9
Affected Issues  0033906: Failed opening core.php in timeline_inc.php on PHP 8.2 / IIS
Changeset

Use absolute path to schema.php in html API

print_admin_menu_bar() needs to include schema.php, to determine whether
we have an upgrade pending or not.

This include_once call did not specify the path to the file, resulting
in a failure to include it on IIS with FastCGI, as the current working
directory was not set to that of the currently executing script, but to
where the PHP executable was stored. This caused $g_upgrade to be null,
leading to an error when calling count() on PHP 8.

We now use require_once instead so we get a hard failure if schema.php
could not be included, and we specify the full path to the file to avoid
the problem on IIS/FastCGI.

Fixes 0033906

mod - core/html_api.php Diff File