[wp-trac] [WordPress Trac] #38331: Pagination crashes when using Greek query arguments

WordPress Trac noreply at wordpress.org
Thu Dec 8 02:02:33 UTC 2016


#38331: Pagination crashes when using Greek query arguments
---------------------------------------+-----------------------------
 Reporter:  kouratoras                 |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  low                        |   Milestone:  Future Release
Component:  Canonical                  |     Version:  4.1
 Severity:  major                      |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+-----------------------------

Comment (by dgwatkins):

 I did some debugging to see where this is coming from, here is what I
 found.

 * In redirect_canonical() we use remove_query_arg() when there is
 pagination.

 * This involves using parse_str() a couple of times, which has the side
 effect of urldecoding both the keys and the values in the query_string
 array.

 * Immediately after we re-encode the values to compensate the said side
 effect, but we leave the keys behind.

 This difference causes the redirect,

 Im attaching a patch that works, Im not sure if there is a better way of
 doing it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38331#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list