WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 2 weeks 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:

Description

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

<?php



                $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 :

<?php
                $current_url = site_url(remove_query_arg( 'paged'));

Change History (3)

#1 @tinodjwp
4 weeks ago

  • Component changed from General to Administration

#2 @tinodjwp
4 weeks ago

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

#3 @tinodjwp
2 weeks ago

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

Note: See TracTickets for help on using tickets.