Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0035215mantisbtcode cleanuppublic2025-03-05 12:34
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version2.28.0Fixed in Version2.28.0 
Summary0035215: PHP 8.4: Implicitly nullable parameter types are deprecated
Description

MantisBT throws nearly 100 deprecation notices:

Implicitly marking parameter XXX as nullable is deprecated, the explicit nullable type must be used instead

https://www.php.net/manual/en/migration84.deprecated.php

TagsPHP 8.4

Relationships

child of 0035216 assigneddregad PHP 8.4 compatibility 

Activities

raspopov

raspopov

2024-12-30 13:16

reporter   ~0069626

BTW, which variant of nullable syntax will MantisBT use "?" or "|null"?

dregad

dregad

2025-01-31 20:56

developer   ~0069802

PR https://github.com/mantisbt/mantisbt/pull/2087

atrol

atrol

2025-02-09 15:45

developer   ~0069839

Last edited: 2025-02-09 16:07

@dregad
Manage > Projects

INTERNAL APPLICATION ERROR

print_form_button(): Argument #3 ($p_args_to_post) must be of type array, null given, called in C:\xampp82\htdocs\mantisbt\manage_proj_page.php on line 99

Manage > Users > UNUSED


INTERNAL APPLICATION ERROR

print_form_button(): Argument #3 ($p_args_to_post) must be of type array, null given, called in C:\xampp82\htdocs\mantisbt\manage_user_page.php on line 307
atrol

atrol

2025-02-09 16:32

developer   ~0069840

PR https://github.com/mantisbt/mantisbt/pull/2091

dregad

dregad

2025-02-10 11:42

developer   ~0069844

Thanks for testing. Not sure how I could have missed this :-/

If possible, I'd rather fix the calls to print_form_button() to provide an empty array, rather than changing the function signature to allow null. I'll have a closer look.

atrol

atrol

2025-02-10 12:05

developer   ~0069845

I'd rather fix the calls to print_form_button() to provide an empty array

This was also my preference.
Not sure if we have to consider that plugins could also be affected.

atrol

atrol

2025-02-10 17:06

developer   ~0069847

@dregad
Found one more regression
Goto page Main

INTERNAL APPLICATION ERROR

db_query(): Argument #2 ($p_params) must be of type array, null given, called in C:\xampp82\htdocs\mantisbt\core\news_api.php on line 291

PR with fixes of the calls https://github.com/mantisbt/mantisbt/pull/2093

dregad

dregad

2025-02-11 02:28

developer   ~0069849

I merged PR 2093

dregad

dregad

2025-02-25 19:29

developer   ~0069912

Another regression

INTERNAL APPLICATION ERROR
BugFilterQuery::helper_convert_legacy_clause(): Argument #2 ($p_params) must be of type array, null given, called in .../core/classes/BugFilterQuery.class.php on line 1645

Occurs when using plugin filters (e.g. FilterBugList plugin).

dregad

dregad

2025-03-05 12:29

developer   ~0069938

And another...

Argument 2 passed to gpc_get_string_array() must be of the type array, null given, called in .../core/gpc_api.php on line 213

Occurs in bug_report.php with a custom field of type Multiselection list or Checkbox.

Related Changesets

MantisBT: master c939e557

2025-01-26 04:54

dregad


Details Diff
PHP 8.4: Implicitly nullable parameter declaration

Adjust function declarations to fix deprecation notices, and adapt some
PHPDoc blocks accordingly.

Fixes 0035215
Affected Issues
0035215
mod - api/soap/mc_issue_api.php Diff File
mod - core/access_api.php Diff File
mod - core/bug_group_action_api.php Diff File
mod - core/category_api.php Diff File
mod - core/classes/BugFilterQuery.class.php Diff File
mod - core/classes/DbQuery.class.php Diff File
mod - core/custom_field_api.php Diff File
mod - core/custom_function_api.php Diff File
mod - core/database_api.php Diff File
mod - core/email_api.php Diff File
mod - core/exceptions/ClientException.php Diff File
mod - core/exceptions/LegacyApiFaultException.php Diff File
mod - core/exceptions/MantisException.php Diff File
mod - core/exceptions/ServiceException.php Diff File
mod - core/exceptions/StateException.php Diff File
mod - core/filter_api.php Diff File
mod - core/filter_form_api.php Diff File
mod - core/gpc_api.php Diff File
mod - core/html_api.php Diff File
mod - core/print_api.php Diff File
mod - core/summary_api.php Diff File
mod - core/version_api.php Diff File
mod - plugins/MantisGraph/core/graph_api.php Diff File
mod - plugins/MantisGraph/pages/issues_trend_graph.php Diff File
mod - summary_page.php Diff File

MantisBT: master ef3491c2

2025-02-10 16:59

atrol


Details Diff
Fix print_form_button and db_query regressions

Issue 0035215
Affected Issues
0035215
mod - core/news_api.php Diff File
mod - manage_proj_page.php Diff File
mod - manage_user_page.php Diff File

MantisBT: master c1edaa4a

2025-02-25 19:29

dregad


Details Diff
Fix Argument must be of type array, null given

BugFilterQuery::build_prop_plugin_filters() initializes $t_params = null
instead of [], causing error in helper_convert_legacy_clause().

Regression introduced by c939e5574556a2986bdd23d2ba9369d03595c269.

Issue 0035215
Affected Issues
0035215
mod - core/classes/BugFilterQuery.class.php Diff File

MantisBT: master c076bc56

2025-03-05 12:33

dregad


Details Diff
Fix PHP TypeError calling gpc_get_string_array()

Argument 2 passed to gpc_get_string_array() must be of the type array,
null given, called in .../core/gpc_api.php on line 213

Regression introduced by c939e5574556a2986bdd23d2ba9369d03595c269.

Fixes 0035215
Affected Issues
0035215
mod - core/gpc_api.php Diff File