View Issue Details

IDProjectCategoryView StatusLast Update
0029853mantisbtbugtrackerpublic2022-05-10 09:56
Reporterdregad Assigned Todregad  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version2.25.3 
Target Version2.25.4Fixed in Version2.25.4 
Summary0029853: $g_path incorrectly set in config_defaults_inc.php on PHP 5.6
Description

The following PHP warning is triggered (if error reporting settings allow it):

Warning: dirname() expects exactly 1 parameter, 2 given in .../mantisbt/mantisbt/config_defaults_inc.php on line 234

This is a regression introduced by MantisBT master-2.25 cd45a5c8 (see 0029485):
Some changes were committed to 2.25 branch, that should only have gone into master (2.26), introducing use of the new dirname() signature with 2 parameters, which is not supported on PHP 5.6.

There is an actual impact only if the installation does not set $g_path in config_inc.php. In that case, accessing PHP scripts in sub-directories (e.g. admin, admin/checks, api/soap and api/rest apis) will not work properly.

This is causing PHPUnit tests to fail on PHP 5.6, as mantisconnect.php is not able to generate the WSDL and throws the following error:

PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost:8080/api/soap/mantisconnect.php?wsdl' : Extra content at the end of the document in .../mantisbt/mantisbt/tests/soap/SoapBase.php on line 110

TagsNo tags attached.

Relationships

related to 0029485 closeddregad Update ADOdb to 5.20.21 

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master-2.25 95fbe0cf

2022-04-13 13:58

dregad


Details Diff
Fix dirname() accepting only 1 param in PHP 5.6

Partial revert of 03b9a4dd72d00ac5b6ce74d4616e175aae8508b5. These
changes are not required for PHP 8.1 compatibility, and introduce a
regression with PHP 5.6 which is still supported in MantisBT 2.25.

Fixes 0029853
Affected Issues
0029853
mod - config_defaults_inc.php Diff File