Skip to content

Instantly share code, notes, and snippets.

@arturo-c
Created September 12, 2014 14:44
Show Gist options
  • Save arturo-c/425cc4f3e5bc0933ce9b to your computer and use it in GitHub Desktop.
Save arturo-c/425cc4f3e5bc0933ce9b to your computer and use it in GitHub Desktop.
diff --git a/www/includes/module.inc b/www/includes/module.inc
index e4a790a..3145001 100644
--- a/www/includes/module.inc
+++ b/www/includes/module.inc
@@ -523,7 +523,7 @@ function module_invoke() {
return call_user_func_array($function, $args);
}
else {
- return array();
+ return NULL;
}
}
/**
diff --git a/www/sites/all/modules/contrib/features/features.module b/www/sites/all/modules/contrib/features/features.module
index b5b5f68..921b4ff 100644
--- a/www/sites/all/modules/contrib/features/features.module
+++ b/www/sites/all/modules/contrib/features/features.module
@@ -268,6 +268,10 @@ function features_include($reset = FALSE) {
// Check for implementing modules and make necessary inclusions.
foreach (module_implements('features_api') as $module) {
$info = module_invoke($module, 'features_api');
+ // Check for null value and set that to empty array.
+ if (is_null($info)) {
+ $info = array();
+ }
foreach ($info as $component) {
if (isset($component['file'])) {
require_once $component['file'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment