Opened 13 years ago
Closed 13 years ago
#1709 closed defect (bug) (fixed)
bbp_redirect_to_field() contains error in conditional statement
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | General - Administration | Keywords: | |
Cc: |
Description
This conditional statement, found in bbp-common-template.php, contains an error.
function bbp_redirect_to_field( $redirect_to = '' ) { // Rejig the $redirect_to if ( !isset( $_SERVER['REDIRECT_URL'] ) || ( !$redirect_to = home_url( $_SERVER['REDIRECT_URL'] ) ) ) $redirect_to = wp_get_referer();
The assignment !$redirect_to = home_url() stomps on the value of $redirect_to and also makes the conditional return TRUE regardless of the content of $redirect_to
Should be:
if ( !isset( $_SERVER['REDIRECT_URL'] ) || ( !$redirect_to == home_url( $_SERVER['REDIRECT_URL'] ) ) ) $redirect_to = wp_get_referer();
Change History (2)
Note: See
TracTickets for help on using
tickets.
Good catch!