WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#19377 closed defect (bug) (fixed)

Notice: Undefined index: settings-updated in wp-admin/includes/template.php on line 1322

Reported by: garyc40 Owned by: duck_
Milestone: 3.4 Priority: normal
Severity: minor Version: 3.2.1
Component: Warnings/Notices Keywords: has-patch commit
Focuses: Cc:

Description

When I use settings_errors() with the third argument set to true, I get the following PHP notice:

Notice: Undefined index: settings-updated in wp-admin/includes/template.php on line 1322

Attached a patch. The fix is straight-forward and harmless enough.

Attachments (4)

settings_errors.diff (734 bytes) - added by garyc40 9 years ago.
settings-errors.2.diff (592 bytes) - added by garyc40 9 years ago.
Previous patch was a bad one.
settings-errors.3.diff (1020 bytes) - added by garyc40 9 years ago.
What is wrong with me? The previous 2 patches were very very bad.
settings-errors.4.diff (537 bytes) - added by SergeyBiryukov 9 years ago.
Refreshed for current trunk

Download all attachments as: .zip

Change History (8)

@garyc40
9 years ago

Previous patch was a bad one.

@garyc40
9 years ago

What is wrong with me? The previous 2 patches were very very bad.

#1 @SergeyBiryukov
9 years ago

The condition seems reversed. Shouldn't it be !empty()?

#2 @SergeyBiryukov
9 years ago

Didn't see settings-errors.3.diff before commenting :)

@SergeyBiryukov
9 years ago

Refreshed for current trunk

#3 @SergeyBiryukov
9 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.4

#4 @duck_
9 years ago

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

In [19733]:

Prevent "Undefined index: settings-updated" notice in settings_errors(). Props garyc40. Fixes #19377.

Note: See TracTickets for help on using tickets.