Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7758 closed defect (bug) (fixed)

PHP notices on deactivation

Reported by: Mamaduka Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

When deactivating plugin bp_check_theme_template_pack_dependency() is causing PHP notices/warnings.

Cause: On deactivation BP bails early in BuddyPress::setup_actions() and doesn't register theme packages.

I think the easiest way to fix this will be to add a check to bp_check_theme_template_pack_dependency() function and bail early as well.

P.S. Happy to provide a patch.

Attachments (2)

7758.1.diff (568 bytes) - added by Mamaduka 3 years ago.
7758.2.diff (543 bytes) - added by Mamaduka 3 years ago.

Download all attachments as: .zip

Change History (6)

@Mamaduka
3 years ago

@Mamaduka
3 years ago

#1 @Mamaduka
3 years ago

  • Keywords has-patch added

Attached two versions of the patch. Personally I like first solution, make easier to understand code logic IMO. Second one needs more context to understand while we're bailing early on BP deactivation.

#2 @DJPaul
3 years ago

The first patch is too specific to an implementation. If we change that internal structure of the global, we have to update everywhere we check the path directly. The helper function in the second patch is consistent with how we handle this sort of situation elsewhere already. Thanks for the patch!

#3 @DJPaul
3 years ago

  • Component changed from Templates to Core

#4 @djpaul
3 years ago

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

In 11987:

Core: do not run bp_check_theme_template_pack_dependency() if BuddyPress is being deactivated.

See r11936

Fixes #7758

Props Mamaduka

Note: See TracTickets for help on using tickets.