View Issue Details

IDProjectCategoryView StatusLast Update
0027464mantisbtprintingpublic2020-12-30 07:37
ReporterRealityRipple Assigned Toatrol  
PrioritylowSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Target Version2.24.4Fixed in Version2.24.4 
Summary0027464: print_manage_user_sort_link Function Parameter Required after Optional
Description

PHP 8 finally throws a warning when a parameter doesn't have a default value when a prior parameter does. This means core/print_api.php's print_manage_user_sort_link() function's $p_search parameter is officially going to be a troublemaker.
Best take care of it before 8 goes live.

Steps To Reproduce

Use PHP 8 RC

Additional Information

Line 1380:
-function print_manage_user_sort_link( $p_page, $p_string, $p_field, $p_dir, $p_sort_by, $p_hide_inactive = 0, $p_filter = ALL, $p_search, $p_show_disabled = 0, $p_class = '' ) {
+function print_manage_user_sort_link( $p_page, $p_string, $p_field, $p_dir, $p_sort_by, $p_hide_inactive = 0, $p_filter = ALL, $p_search = '', $p_show_disabled = 0, $p_class = '' ) {

TagsPHP 8

Relationships

related to 0027465 closedatrol Declaring a required parameter after an optional one is deprecated in PHP 8 

Activities

atrol

atrol

2020-11-01 09:23

developer   ~0064603

Thanks @RealityRipple for reporting the issue.

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

dregad

dregad

2020-12-30 06:18

developer   ~0064871

Backporting to 2.24 branch

Related Changesets

MantisBT: master 928875f8

2020-11-01 09:12:43

atrol

Details Diff
Fix PHP 8 warning on manage_user_page

Declaring a required parameter after an optional one is deprecated in
PHP 8.

Fixed also usage of undefined constant ALL

Fixes 0027464
Affected Issues
0027464
mod - core/print_api.php Diff File

MantisBT: master-2.24 e2276cba

2020-11-01 09:12:43

atrol


Committer: dregad Details Diff
Fix PHP 8 warning on manage_user_page

Declaring a required parameter after an optional one is deprecated in
PHP 8.

Fixed also usage of undefined constant ALL

Fixes 0027464

(cherry picked from commit d6e395e7cab2724ad5edc3a3b53592462bb8415d)
Affected Issues
0027464
mod - core/print_api.php Diff File