Skip to:

Opened 3 years ago

Closed 3 years 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's profile imath Owned by: imath's profile imath
Milestone: 8.0.0 Priority: normal
Severity: normal Version:
Component: Templates Keywords: has-patch


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 3 years ago.

Download all attachments as: .zip

Change History (2)

3 years ago

#1 @imath
3 years 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.