Skip to:
Content

bbPress.org

Opened 11 months ago

Closed 7 months ago

Last modified 7 months ago

#3626 closed defect (bug) (fixed)

bbp_pre_handle_404() return type may be incorrect

Reported by: ethitter's profile ethitter Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.14 Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: has-patch commit
Cc:

Description

When bbp_pre_handle_404() is triggered, it may override its return value to be null, though the Core filter expects a boolean. If a codebase enforces strict typing, the function causes a TypeError.

Attachments (1)

bbp_pre_handle_404.diff (601 bytes) - added by ethitter 11 months ago.

Download all attachments as: .zip

Change History (5)

#1 @ethitter
11 months ago

  • Keywords has-patch added

Attached patch corrects the return type without changing the overall behaviour of the function.

#2 @johnjamesjacoby
7 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6.14
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned
  • Version set to 2.0

#3 @johnjamesjacoby
7 months ago

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

In 7314:

Common: fix incorrect return type of bbp_pre_handle_404().

This change ensures that true is always returned when overriding the 404 status.

Props ethitter.

In branches/2.6, for 2.6.14.

Fixes #3626.

#4 @johnjamesjacoby
7 months ago

In 7315:

Common: fix incorrect return type of bbp_pre_handle_404().

This change ensures that true is always returned when overriding the 404 status.

Props ethitter.

In trunk, for 2.7.

Fixes #3626.

Note: See TracTickets for help on using tickets.