Skip to:
Content

BuddyPress.org

Opened 6 months ago

Closed 6 months ago

#8464 closed defect (bug) (fixed)

Nouveau should check the component is active before trying to use a `bp_get_{component}_slug()` function

Reported by: imath Owned by: imath
Milestone: 8.0.0 Priority: normal
Severity: normal Version:
Component: Templates Keywords: has-patch
Cc:

Description

This is a follow up of #8133. [12892] introduced direct uses of bp_get_{component}_slug() functions (without checking the corresponding component is active). If the corresponding component is not active it can generate fatal errors as the corresponding bp_get_{component}_slug() function is not available.

Attachments (1)

8464.patch (28.8 KB) - added by imath 6 months ago.

Download all attachments as: .zip

Change History (2)

@imath
6 months ago

#1 @imath
6 months ago

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

In 12908:

BP Nouveau: introduce a function to get active component slugs

bp_nouveau_get_component_slug() accepts the component's ID as an argument and uses the bp_get_{$component_id}_slug() corresponding function to get its slug only if the component is active.

Replace all occurences of bp_get_{$component_id}_slug() by bp_nouveau_get_component_slug( $component_id ) to prevent errors.

Fixes #8464

Note: See TracTickets for help on using tickets.