Making WordPress.org

Opened 6 years ago

Closed 6 years ago

#3724 closed defect (bug) (fixed)

Avoid warnings being logged by convert_toggles_to_actions

Reported by: clorith's profile Clorith Owned by: otto42's profile Otto42
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch
Cc:

Description

We have a filter that triggers Moderators::convert_toggles_to_actions(), which expects 3 arguments every time, but the filter doesn't always supply 3 arguments.

This patch makes the 3rd (and actually unused at this time) argument optional to avoid lots of warnings being logged (or output if you're working in a development environment).

The warning it throws, for reference:

Warning: Missing argument 3 for WordPressdotorg\Forums\Moderators::convert_toggles_to_actions()

Attachments (1)

3724.patch (1.0 KB) - added by Clorith 6 years ago.

Download all attachments as: .zip

Change History (2)

@Clorith
6 years ago

#1 @Otto42
6 years ago

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

In 7482:

Support Forums: Correct arguments for function to avoid warnings being thrown. Fixes #3724. props Clorith

Note: See TracTickets for help on using tickets.