Customizing Severity
Posted: 13 Oct 2023, 15:59
Testing PHP upgrade from 7.3 (on the hosting system) to 8.0 (on local Windows system, XAMPP) using the same Mantis source code in both.
On the PHP v7 setup I have entered new strings for severities in config/config_inc.php
Everything seems to work fine. No other files updated. I place the same into my PHP8 setup and in login get
Uncaught Error: Undefined constant "MEDIUM"
I then update config\custom_constants_inc.php and get
Constant MINOR already defined in [my install location]\mantisbt\config\custom_constants_inc.php
The error seems accurate except I thought the purpose of custom_constants_inc.php was to override core\constant_inc.php which it appears not to be doing. I have also followed the instructions given here - viewtopic.php?p=68343#p68343 and get the same results. Is there a change in PHP8?
Any thoughts?
On the PHP v7 setup I have entered new strings for severities in config/config_inc.php
Code: Select all
$g_severity_enum_string = '50:minor,60:medium,70:major';
$g_severity_multipliers = array(
MINOR => 5,
MEDIUM => 6,
MAJOR => 10
);
Uncaught Error: Undefined constant "MEDIUM"
I then update config\custom_constants_inc.php and get
Constant MINOR already defined in [my install location]\mantisbt\config\custom_constants_inc.php
The error seems accurate except I thought the purpose of custom_constants_inc.php was to override core\constant_inc.php which it appears not to be doing. I have also followed the instructions given here - viewtopic.php?p=68343#p68343 and get the same results. Is there a change in PHP8?
Any thoughts?