[wp-trac] [WordPress Trac] #18991: Unnecessarily cryptic code when checking pagename= for verbose rules

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 18 21:23:39 UTC 2011


#18991: Unnecessarily cryptic code when checking pagename= for verbose rules
--------------------------+------------------
 Reporter:  duck_         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.3
Component:  General       |     Version:  3.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------
Changes (by Otto42):

 * cc: nacin (added)


Comment:

 My first couple of stabs at this were attempting to grab whatever-the-heck
 was after pagename and use it appropriately, under the consideration that
 I don't know everything and somebody might have something else there in
 some weird rewrite rule. This turned out to not work because of the
 [array] parameter bits. So it sort of evolved into this over time.

 If we're sure that $matches[x] is the only thing that will ever work here
 anyway, then this patch is perfectly fine and should get pushed into 3.3.

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


More information about the wp-trac mailing list