Skip to:
Content

bbPress.org

Opened 4 years ago

Closed 4 years ago

#3414 closed defect (bug) (fixed)

"You are now logged out" notice never appears

Reported by: isabel104's profile isabel104 Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.7 Priority: low
Severity: minor Version: 2.6.6
Component: Appearance - Theme Compatibility Keywords: has-patch
Cc:

Description

Steps to reproduce the problem:

  1. Visit any forum topic while logged in.
  2. Log out.
  3. Expected result: a notice saying "You are now logged out."
  4. Instead, it doesn't show any notice after logging out.

Solution:

I don't know how to submit patches on Trac, but this is the solution:

In file: "bbPress/src/includes/users/template.php" (https://bbpress.trac.wordpress.org/browser/trunk/src/includes/users/template.php)

at line: 1829

Change:

 if ( ! empty( $_GET['loggedout'] ) && ( true === $_GET['loggedout'] ) ) {

...to:

 if ( ! empty( $_GET['loggedout'] ) && ( 'true' === $_GET['loggedout'] ) ) {

... because GET parmeters are not typed, so 'true' should be a string since the GET param will never be a bool type.

Attachments (1)

3414.patch (574 bytes) - added by dilipbheda 4 years ago.

Download all attachments as: .zip

Change History (4)

@dilipbheda
4 years ago

#1 @johnjamesjacoby
4 years ago

  • Component changed from General to Appearance - Theme Compatibility
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.6.7
  • Owner set to johnjamesjacoby
  • Status changed from new to accepted

#2 @johnjamesjacoby
4 years ago

In 7185:

Notices: correct string type checking of "loggedout" $_GET parameter.

This commit stops checking for a boolean and starts checking for a string, allowing for the "You are now logged out." notice to correctly appear as intended.

In trunk for 2.7.0. See #3414.

Props dilipbheda, isabel104.

#3 @johnjamesjacoby
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 7186:

Notices: correct string type checking of "loggedout" $_GET parameter.

This commit stops checking for a boolean and starts checking for a string, allowing for the "You are now logged out." notice to correctly appear as intended.

In branches/2.6 for 2.6.7. Fixes #3414.

Props dilipbheda, isabel104.

Note: See TracTickets for help on using tickets.