Download & Extend

Disabling default OG notifications causes Strict warnings when other modules use hook_default_rules_config

Project:Drupal Commons
Version:7.x-3.x-dev
Component:Groups
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:demo_framework

Issue Summary

I have some Commons installed alongside Drupal Commerce. When I visit the Feature that handles all these dependencies, I am seeing some PHP warnings.

commons-default_rules_configuration_alter-warning.png

I inserted a krumo dump above to see how many times hook_default_rules_configuration_alter was called. We can see its called 5 times (by various Commerce modules) before commons_groups.module instantiates it.

The commons code assumes $configs['rules_og_member_active'] is available to modify. 5/6 times, its not part of the configs array.

Checking to see if this key exists before assigning anything to the object should prevent this from happening.

AttachmentSize
commons-default_rules_configuration_alter-warning.png218.39 KB
commons_groups-disable-og-notifications-strict-warnings-0.patch829 bytes

Comments

#1

Note: patch looks a little weird because I also adjusted some indentations.

#2

Status:needs review» fixed

Looks good. Committed. Thanks!

http://drupalcode.org/project/commons_groups.git/commit/7be52ca

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here