WordPress.org

Making WordPress.org

#3724 closed defect (fixed)

Avoid warnings being logged by convert_toggles_to_actions

Reported by: Clorith Owned by: 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 14 months ago.

Download all attachments as: .zip

Change History (2)

@Clorith
14 months ago

#1 @Otto42
14 months 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.