Page 1 of 1

Error when displaying the Incidents after updated Mantis

Posted: 22 Aug 2024, 19:20
by dterzan
Hello, good morning everyone. I updated our Mantis in all its layers;

- Old Mantis
OS: Centos7
Web Server: Apache/2.4.6
PHP version: 5.4.16
DB Version: 15.1 Distrib 5.5.44-MariaDB
Mantis Version: 1.2.19

- New Mantis
OS: Centos8
Web Server: Apache/2.4.37
PHP version: 7.2.24
DB Version: 15.1 Distrib 10.3.28-MariaDB
Mantis Version: 2.26.2

Although I have been able to solve some problems, I present the attached error when displaying the Incidents.

I have reviewed the problem and would understand that the count() function is being called on a variable that is not an array or an object that implements the Countable interface (required since PHP version 7.2).

How could I solve this problem? Could you help me find the solution?

Grateful in advance. Greetings.

Re: Error when displaying the Incidents after updated Mantis

Posted: 22 Aug 2024, 20:10
by atrol
Did you set $g_status_enum_workflow in config/config.inc.php or status_enum_worflow in database?
For that, check also page Manage > Configuration > Workflow Transitions

Re: Error when displaying the Incidents after updated Mantis

Posted: 22 Aug 2024, 21:01
by dterzan
That status_enum_workflow parameter is found in the database but the variable $g_status_enum_workflow is not defined in the config.inc.php file. However, I was able to notice that in the Configuration - Configuration Report section, the variable in question showed a [Show content] value; When editing and updating it, it was deleted from the list but would allow the Incidents interface to be displayed correctly. I applied the same process for the other variables that had the value [Show content] registered and error messages are no longer displayed in other interfaces. By doing that, one of the status_enum_worflow values ​​was removed from the DB. Is it correct to execute the applied process? On the other hand, when creating the variable again, the problem occurs again.

I was checking the link https://mantisbt.org/bugs/view.php?id=20133. Should I create the variables again and assign the values ​​from the DB as shown in the first image?

Re: Error when displaying the Incidents after updated Mantis

Posted: 22 Aug 2024, 21:26
by atrol
Use page Manage > Configuration > Workflow Transitions page to set the options the way you want.
Setting configuration option values to NULL via the generic configuration option page makes no sense.