[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 20:50:35 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     |
--------------------------+------------------

Comment (by Otto42):

 While you're correct in the context of the core pagename rules, I wrote it
 this way in order to account for pagename rules that might be added by
 other systems/plugins. Basically, we don't know that pagename=matches
 here, not for sure.

 Now, the regexp may be off for other cases, but I'd prefer to see some of
 those other cases before saying that pagename is always going to be
 =$matches[x].

 Maybe I'm being overly cautious?

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


More information about the wp-trac mailing list