Skip to:
Content

Opened 3 months ago

Closed 2 months ago

#3232 closed defect (fixed)

Unidentified index Error

Reported by: Venutius Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.14
Component: General Keywords: needs-patch
Cc:

Description

I'm seeing the following error:

[23-Nov-2018 03:38:40 UTC] PHP Notice: Undefined index: forum_id in /wp-content/plugins/bbpress/includes/forums/template.php on line 767

Looking at that function, I can see there's an empty check on the next line:

// Loop through forums and create a list
$sub_forums = bbp_forum_get_subforums( $r['forum_id'] );
if ( !empty( $sub_forums ) ) {

Maybe we can also have an isset check for $rforum_id??

Change History (4)

#1 @johnjamesjacoby
3 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby

#2 @johnjamesjacoby
3 months ago

Interesting. I’ll look into it.

What pages are you seeing this on?

#3 @Venutius
3 months ago

I'm not sure, it's on a live site and I'm just seeing the errors come through on my log.

#4 @johnjamesjacoby
2 months ago

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

In 6875:

Forums: protect against a missing/malformed forum_id value when listing subforums.

Fixes #3232.

Note: See TracTickets for help on using tickets.