Re: Date type custom field with default value
Posted: 19 Sep 2017, 22:44
The problem occurs as there are still ´NULL´ strings in mantis_history_table.
https://www.mantisbt.org/forums/
Code: Select all
date(): Argument #2 ($timestamp) must be of type ?int, string given
C:\inetpub\wwwroot\mantisbt-2.24.4\core\date_api.php: 241: - - - - date( <string>'Y-m-d', <string>'' )
C:\inetpub\wwwroot\mantisbt-2.24.4\core\cfdefs\cfdef_standard.php: 500: - - - - print_date_selection_set( <string>'custom_field_12', <string>'Y-m-d', <string>'', <boolean>false, <boolean>true, <integer>0, <integer>0, <string>'input-sm', <string>'' )
C:\inetpub\wwwroot\mantisbt-2.24.4\core\custom_field_api.php: 1429: - - - - cfdef_input_date( <array> { ['id'] => '12', ['name'] => 'Start of Development/Fixing', ['type'] => '8', ['possible_values'] => '', ['default_value'] => '', ['valid_regexp'] => '', ['access_level_r'] => '55', ['access_level_rw'] => '55', ['length_min'] => '0', ['length_max'] => '0', ['require_report'] => '0', ['require_update'] => '0', ['display_report'] => '0', ['display_update'] => '1', ['require_resolved'] => '0', ['display_resolved'] => '0', ['display_closed'] => '0', ['require_closed'] => '0', ['filter_by'] => '1', ['linked_projects'] => <array> { [0] => 1, [1] => 2, [2] => 3, [3] => 4, [4] => 5, [5] => 6, [6] => 7, [7] => 8, [8] => 12, [9] => 15, [10] => 19, [11] => 32, [12] => 42 } }, <string>'', <string>'' )
C:\inetpub\wwwroot\mantisbt-2.24.4\bug_update_page.php: 713: - - - - print_custom_field_input( <array> { ['id'] => '12', ['name'] => 'Start of Development/Fixing', ['type'] => '8', ['possible_values'] => '', ['default_value'] => '', ['valid_regexp'] => '', ['access_level_r'] => '55', ['access_level_rw'] => '55', ['length_min'] => '0', ['length_max'] => '0', ['require_report'] => '0', ['require_update'] => '0', ['display_report'] => '0', ['display_update'] => '1', ['require_resolved'] => '0', ['display_resolved'] => '0', ['display_closed'] => '0', ['require_closed'] => '0', ['filter_by'] => '1', ['linked_projects'] => <array> { [0] => 1, [1] => 2, [2] => 3, [3] => 4, [4] => 5, [5] => 6, [6] => 7, [7] => 8, [8] => 12, [9] => 15, [10] => 19, [11] => 32, [12] => 42 } }, <integer>6014, <string>'0' )
Using PHP 7.x should also fix the issue and maybe even some more PHP 8 related issues.