View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027928 | mantisbt | performance | public | 2021-01-30 12:00 | 2021-02-21 11:04 |
Reporter | midnightltd | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 2.24.4 | ||||
Target Version | 2.25.0 | Fixed in Version | 2.25.0 | ||
Summary | 0027928: Unable to edit Issues having Date custom fields on PHP 8.0 | ||||
Description | When trying to edit some records not all using PHP 8.0.1 I was receiving and error that a problem occurred.. Log shows these errors | ||||
Steps To Reproduce |
| ||||
Tags | PHP 8 | ||||
I was able to roll back to PHP 7.4.14 and it all works. |
|
To facilitate issue reproduction, can you please provide details about the offending custom field, and the value(s) that are causing the error to occur ? |
|
Nevermind, I can reproduce the behavior by defining a date custom field with default value set to empty string. |
|
Sorry for not getting back before now. We have 2 custom date fields, one float and 2 string fields and most of the time the fields are blank. We just use them for certain bugs. |
|
MantisBT: master c09fb41b 2021-01-31 08:41:13 Details Diff |
Fix PHP warning when updating issue with date CF On PHP 8, when updating an issue in a project where a date custom field is linked, and the field's value is not set (empty string), Mantis throws a Warning: Uncaught TypeError: date(): Argument 0000002 ($timestamp) must be of type ?int, string given This fixes the issue by setting the date to 0 if it is not numeric, prior to calling print_date_selection_set(). Fixes 0027928 |
Affected Issues 0027928 |
|
mod - core/cfdefs/cfdef_standard.php | Diff File |