View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030777 | mantisbt | upgrade | public | 2022-07-13 13:23 | 2023-02-22 19:21 |
Reporter | pbeaumadier | Assigned To | dregad | ||
Priority | high | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.25.3 | ||||
Target Version | 2.25.6 | Fixed in Version | 2.25.6 | ||
Summary | 0030777: Scalar typehint is not supported in PHP 5.x | ||||
Description | I upgraded my MantisBT installation from 2.25.2 to 2.25.5. I followed the usual procedure described in the documentation. In /admin/install.php everything was green (GOOD) as you can see. But then when I want to login to the new version, I get an error 500. | ||||
Additional Information | OS is Linux RHEL 7.9 with PHP/MariaDB. The message in the Apache error log file is : [Wed Jul 13 19:22:58.959808 2022] [:error] [pid 96189] [client 91.178.165.235:34226] PHP Fatal error: Default value for parameters with a class type hint can only be NULL in /mnt/data/apps/mantisbt-2.25.5/core/summary_api.php on line 678 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Which PHP version do you use? |
|
@dregad your changes in 0029846 broke PHP 5.5 compatibility. Scalar type hints are supported starting from PHP 7.0 |
|
I am using PHP Version 5.6.25 |
|
@pbeaumadier as a quick workaround, changing line 678 in file core/summary_api.php
to
should fix the issue. (didn't try) |
|
Thanks, I will try it right now and let you know |
|
So I can confirm it fixes this issue. Thanks a lot. |
|
Sorry about that, will fix. |
|
Hello, |
|
MantisBT: master-2.25 9ee6f08e 2022-07-15 12:31 Details Diff |
Remove scalar typehint Partial revert of 0b814f0f8665b19bb1eeb831803085d46de2ab9f. This feature is not unsupported in PHP 5.x, and causes a Fatal error: Default value for parameters with a class type hint can only be NULL in summary_api.php on line 678. Fixes 0030777 |
Affected Issues 0030777 |
|
mod - core/summary_api.php | Diff File | ||
MantisBT: master acf59c4b 2022-07-15 12:39 Details Diff |
Merge branch 'master-2.25' We are actually NOT merging the change from commit 9ee6f08e75f6c2824263417103f4624ae67cf92e, as issue 0030777 only exists with PHP 5.x, and on master we require 7.0 or later. |
Affected Issues 0030777 |