Skip to:
Content

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#3142 closed defect (fixed)

Widgets throw undefined index error notices on first use

Reported by: jrf Owned by: johnjamesjacoby
Milestone: 2.5.14 Priority: normal
Severity: normal Version: 2.1
Component: API - Widgets Keywords: has-patch
Cc: johnjamesjacoby, wordpress_nospam@…

Description

Both the BBP_Replies_Widget and the BBP_Topics_Widget will throw "Undefined index" notices whenever "Show Post Date" and/or "Show topic/reply author" is unchecked. This will happen on initially adding the widget, but also on any save after that as long as one of the two checkboxes is not checked.

The accompanying patch will fix this.

The issue is easy to reproduce:

  1. Set error_reporting( -1 ); in wp-config.php.
  2. Enable error logging
  3. Add either or the two widgets
  4. See the errors in the log

Attachments (1)

trac-3142-widgets-undefined-index.patch (1.9 KB) - added by jrf 18 months ago.

Download all attachments as: .zip

Change History (5)

#1 @jrf
18 months ago

  • Cc wordpress_nospam@… added

#2 @johnjamesjacoby
18 months ago

In 6659:

Widgets: add isset() checks to checkbox attributes.

This change fixes debug notices when saving Topics & Replies widgets and show_date or show_user are not checked.

2.5 branch, for 2.5.14. Props jrf. See #3142.

#3 @johnjamesjacoby
18 months ago

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

In 6660:

Widgets: add isset() checks to checkbox attributes.

This change fixes debug notices when saving Topics & Replies widgets and show_date or show_user are not checked.

Trunk, for 2.6. Props jrf. Fixes #3142.

#4 @johnjamesjacoby
18 months ago

  • Milestone changed from Awaiting Review to 2.5.14
  • Version changed from trunk to 2.1
Note: See TracTickets for help on using tickets.