Skip to:
Content

bbPress.org

Opened 10 years ago

Closed 10 years ago

#2749 closed defect (bug) (fixed)

Notices when template stack is empty

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.1
Component: Appearance - Theme Compatibility Keywords:
Cc:

Description

If the template stack is deliberately emptied, a few debug notices will occur:

Warning: next() expects parameter 1 to be array, null given in /includes/core/template-functions.php on line 334
PHP Warning:  current() expects parameter 1 to be array, null given in /includes/core/template-functions.php on line 328
Notice: Undefined property: stdClass::$packages in /includes/core/theme-compat.php on line 104

Change History (2)

#1 @johnjamesjacoby
10 years ago

Fixing these notices is trivial with a few empty() and isset() checks.

#2 @johnjamesjacoby
10 years ago

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

In 5608:

Prevent notices and warnings when template stack is empty. Fixes #2749.

Note: See TracTickets for help on using tickets.