Features calls taxonomy_vocabulary_machine_name_load() in _user_features_change_term_permission() on line 1091 of features.module, which causes the following error if taxonomy is not enabled:

PHP Fatal error: Call to undefined function taxonomy_vocabulary_machine_name_load()

Either the dependency should be declared in features.info or all dependent code should be wrapped in module_exists().

Comments

hefox’s picture

Hm, this error should only be encountered if exported permissions from taxonomy module -- does the feature with those permissions not have dependency to taxonomy itself?

Adding a module_exists is fine though

  • hefox committed 2c003c9 on 7.x-2.x
    Isssue #2413953: Ensure that taxonomy exists before calling taxonomy...
hefox’s picture

Status: Active » Fixed
chasingmaxwell’s picture

You're right that this bug would have only been encountered when a feature module failed to declare a dependency on the taxonomy module. Still a good idea to avoid a fatal error in that situation, though. Thanks for the quick fix!

Status: Fixed » Closed (fixed)

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