[wp-trac] [WordPress Trac] #12700: Malformed permalinks for feeds and paged / generate_rewrite_rules

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 24 23:48:22 UTC 2010


#12700: Malformed permalinks for feeds and paged / generate_rewrite_rules
--------------------------+-------------------------------------------------
 Reporter:  t31os_        |       Owner:  ryan                      
     Type:  defect (bug)  |      Status:  new                       
 Priority:  normal        |   Milestone:  Unassigned                
Component:  Permalinks    |     Version:  3.0                       
 Severity:  normal        |    Keywords:  needs-testing, needs-patch
--------------------------+-------------------------------------------------
 All rewrite rules(custom or standard options, non-default obviously) seem
 to suffer for a minor issue on rewrite generation, on iterations 5 and 6,
 $query is empty for those iterations (Line 1337 - the for loop)..
 resulting in malformed rules, ie. index.php?&feed ..
 {{{
 $feedquery
 $feedquery2
 $pagequery
 }}}
 Are effected as a result, 6 rules then contain the malformed query
 string..
 [[BR]]
 Line 1349 sets this to an empty string.
 {{{
 $query = ( isset($queries) && is_array($queries) ) ? $queries[$num_toks -
 1] : '';
 }}}
 Lines 1368, 1382, and 1386 then set rules incorrectly.
 [[BR]]
 A simple fix, just conditionalise the three lines with a string comparison
 for those lines...
 {{{
 if( '' == $query )
   // etc..
 }}}
 Or just use a ternary comparison to do the same..
 [[BR]]
 Could not find an existing report for this, so please close if is indeed
 duplicate.
 [[BR]]
 First trac submission, go easy on me.. ;)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12700>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list