[wp-trac] Re: [WordPress Trac] #4134: next_posts_link outputs a trailing question mark

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 12 01:53:10 GMT 2007


#4134: next_posts_link outputs a trailing question mark
----------------------+-----------------------------------------------------
 Reporter:  charle97  |        Owner:  anonymous
     Type:  defect    |       Status:  new      
 Priority:  normal    |    Milestone:  2.2      
Component:  Template  |      Version:  2.2      
 Severity:  normal    |   Resolution:           
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by charle97):

 further isolated the problem to add_query_arg.

 specifically line 797 for query style and line 801 for clean urls:
 {{{
 791         if (strpos($uri, '?') !== false) {
 792             $parts = explode('?', $uri, 2);
 793             if ( 1 == count($parts) ) {
 794                 $base = '?';
 795                 $query = $parts[0];
 796             } else {
 797                 $base = $parts[0] . '?';
 798                 $query = $parts[1];
 799             }
 800         } elseif (!empty($protocol) || strpos($uri, '/') !== false) {
 801             $base = $uri . '?';
 802             $query = '';
 803         } else {
 804             $base = '';
 805             $query = $uri;
 806         }
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4134#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list