[wp-trac] [WordPress Trac] #15209: $_SERVER['REQUEST_URI'] Doesn't always work correctly

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 25 14:05:56 UTC 2010


#15209: $_SERVER['REQUEST_URI'] Doesn't always work correctly
--------------------------+-------------------------------------------------
 Reporter:  RanY          |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:                 
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 I had problems with links in the admin panel.
 Some of the Query Vars returned twice.

 The Normal Link should be:
 wp-admin/edit.php?post_type=page&paged=2

 But it appears as:
 wp-admin/edit.php?post_type=page?post_type=page&paged=2

 And that broke the link. the solution is to use
 {{{
 $GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'];
 }}}

 Instead of
 {{{
 $_SERVER['REQUEST_URI'];
 }}}

 I've changed all the $_SERVER['REQUEST_URI'] in functions.php and All
 works!

 Source for the solution:
 http://ckon.wordpress.com/2006/08/09/server-request_uri-doesnt-always-
 work-correctly-heres-how-to-fix/

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


More information about the wp-trac mailing list