Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24969 closed defect (bug) (fixed)

wp_redirect must return true

Reported by: tivnet's profile tivnet Owned by: ryan's profile ryan
Milestone: 3.7 Priority: normal
Severity: trivial Version: 2.1
Component: General Keywords: has-patch commit
Focuses: Cc:


A code like this one

if(wp_redirect('/', 301)){

won't work because in the case of success, wp_redirect returns NULL, while it must return a boolean value (true if all was OK)

Attachments (1)

pluggable.php.patch (345 bytes) - added by tivnet 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @rmccue
11 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.7
  • Version changed from trunk to 2.1

Broken since r4407

#2 @ryan
11 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In 24996:

Return true from wp_redirect() when redirect successful. Update phpdoc.

Props tivnet
fixes #24969

#3 @c3mdigital
11 years ago

#17472 was marked as a duplicate.

Note: See TracTickets for help on using tickets.