MantisBT: master-2.24 4aa1c22b

Author Committer Branch Timestamp Parent
dregad dregad master-2.24 2021-02-21 06:01 master-2.24 4795a394
Affected Issues  0027928: Unable to edit Issues having Date custom fields on PHP 8.0
Changeset

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)

mod - core/cfdefs/cfdef_standard.php Diff File