[wp-trac] [WordPress Trac] #20143: Array query args on a paginated archive page creates PHP Warning, breaks page.

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 21 20:11:38 UTC 2012


#20143: Array query args on a paginated archive page creates PHP Warning, breaks
page.
----------------------------------------+------------------
 Reporter:  ericlewis                   |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.4
Component:  Canonical                   |     Version:  3.3
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+------------------
Changes (by nacin):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 The cognitive problem with array_walk() is that it requires a callback
 that is particular to its use, as it needs to accept two particular
 arguments. This is not the case with array_map(). For when the callback
 does not require the key to operate, it is nicer, as you can do things
 like using intval, absint, or whatever else you might have. Or, in this
 case, rawurlencode().

 Since we already have urlencode_deep(), I figure we can just add a
 rawurlencode_deep(). See [attachment:20143.diff]. Still props toppa and
 Sergey for the docs as the approach is the same.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20143#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list