Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#46037 new defect (bug)

Fix URL creating in class-wp-list-table in wp-admin

Reported by: tinodjwp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0.3
Component: Administration Keywords: needs-patch
Focuses: Cc:


At line 1009 and 1010 in wp-admin/includes/class-wp-list-table.php URL is created in the following way:


                $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
                $current_url = remove_query_arg( 'paged', $current_url);

This makes troubles in some scenarios. Recommended way is to replace these two lines, by one line :

                $current_url = site_url(remove_query_arg( 'paged'));

Change History (3)

#1 @tinodjwp
3 months ago

  • Component changed from General to Administration

#2 @tinodjwp
3 months ago

Please also see #46033, maybe there are other places this needs to be fixed.

#3 @tinodjwp
3 months ago

Very similar things should be fixed in function pagination, which starts at line 711.

Note: See TracTickets for help on using tickets.