MantisBT: master c09fb41b

Author Committer Branch Timestamp Parent
dregad dregad master 2021-01-31 08:41:13 master 71f4ca9e
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

mod - core/cfdefs/cfdef_standard.php Diff File