[wp-trac] [WordPress Trac] #17472: wp_redirect() should return true on success

WordPress Trac wp-trac at lists.automattic.com
Tue May 17 12:56:39 UTC 2011


#17472: wp_redirect() should return true on success
--------------------------+-----------------------------
 Reporter:  draca         |      Owner:  draca
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.1.2
 Severity:  minor         |   Keywords:  has-patch
--------------------------+-----------------------------
 Ticket #3250 added the ability for a filter to cancel a redirect request
 and returns false in that event.

 On success, there is no return value specified so the function returns
 NULL per the PHP spec.  A value of true should be returned so that logic
 such as the following can be used:


 {{{
 if (! wp_redirect($redirect_url)) {
   // Handle redirect failure
 }
 }}}

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


More information about the wp-trac mailing list