Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#24969 closed defect (bug) (fixed)

wp_redirect must return true

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

Description

A code like this one

if(wp_redirect('/', 301)){
	error_log('redirected');
}

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 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @rmccue
13 years ago

  • Keywords commit added
  • Milestone Awaiting Review → 3.7
  • Version trunk → 2.1

Broken since r4407

#2 @ryan
13 years ago

  • Owner set to ryan
  • Resolution → fixed
  • Status new → closed

In 24996:

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

Props tivnet
fixes #24969

#3 @c3mdigital
13 years ago

#17472 was marked as a duplicate.

Note: See TracTickets for help on using tickets.