[wp-trac] [WordPress Trac] #18883: Notice generated by malformed permalink structures

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 7 23:50:40 UTC 2011


#18883: Notice generated by malformed permalink structures
--------------------------+-----------------------------
 Reporter:  Viper007Bond  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  lowest        |  Milestone:  Awaiting Review
Component:  Permalinks    |    Version:  3.3
 Severity:  trivial       |   Keywords:  needs-patch
--------------------------+-----------------------------
 Set your post permalink structure to this:

 {{{
 /%foobar/%year%/%monthnum%/%day%/%postname%/
 }}}

 Note the missing percent sign after `foobar`.

 That generates this error after saving the structure:

 {{{

 ( ! ) Notice: Undefined offset: -1 in \wp-includes\rewrite.php on line
 1267
 Call Stack
 #       Time    Memory  Function        Location
 1       0.0011  468272  {main}( )       ..\options-permalink.php:0
 2       1.3076  25846048        WP_Rewrite->flush_rules( )
 ..\options-permalink.php:124
 3       1.3438  25837416        WP_Rewrite->wp_rewrite_rules( )
 ..\rewrite.php:1861
 4       1.3442  25839872        WP_Rewrite->rewrite_rules( )
 ..\rewrite.php:1572
 5       1.3444  25840976        WP_Rewrite->generate_rewrite_rules( )
 ..\rewrite.php:1500
 }}}

 This is the line in question:

 {{{
 $query = ( isset($queries) && is_array($queries) ) ? $queries[$num_toks -
 1] : '';
 }}}

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


More information about the wp-trac mailing list