WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 3 weeks ago

#22228 closed enhancement (fixed)

Remove one-time variable from add_settings_error

Reported by: niallkennedy Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: trivial Version: 3.0
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Append an array to $wp_settings_errors without assigning it to a variable in the previous line.

Before:
$var = array( 'type' => $type ... );
$wp_settings_errors[] = $var;

After:
$wp_settings_errors[] = array( 'type' => $type ... );

Attachments (2)

template.diff (653 bytes) - added by niallkennedy 8 years ago.
append array directly to $wp_settings_errors
22228.diff (700 bytes) - added by obenland 6 years ago.
Refreshed patch

Download all attachments as: .zip

Change History (6)

@niallkennedy
8 years ago

append array directly to $wp_settings_errors

@obenland
6 years ago

Refreshed patch

#1 @obenland
6 years ago

  • Keywords has-patch added
  • Version set to 3.0

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 4.0

#3 @SergeyBiryukov
6 years ago

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

In 28681:

Remove one-time variable from add_settings_error().

props niallkennedy.
fixes #22228.

This ticket was mentioned in Slack in #core-editor by zieladam. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.