View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027928 | mantisbt | custom fields | public | 2021-01-30 12:00 | 2021-03-05 20:11 |
Reporter | midnightltd | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Product Version | 2.24.4 | ||||
Target Version | 2.24.5 | Fixed in Version | 2.24.5 | ||
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 | ||||
Attached Files | |||||
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. |
|
Changed target to 2.24.5 |
|
MantisBT: master c09fb41b 2021-01-31 03:41 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 | ||
MantisBT: master-2.24 4aa1c22b 2021-02-21 06:01 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 (cherry picked from commit c09fb41bf8beae969013029ad0577ab11344e8b1) |
Affected Issues 0027928 |
|
mod - core/cfdefs/cfdef_standard.php | Diff File |