After enabling modules i get:
PHP Fatal error: Unsupported operand types in /var/www/virtual/renner/html/development/code/sites/all/modules/rules/rules.module on line 234
Digging the source shows $data[$hook] is not initialized so under rare circumstances this can kill our installation.
function rules_fetch_data($hook) {
$data = &drupal_static(__FUNCTION__, array());
static $discover = array(
'action_info' => 'RulesActionHandlerInterface',
'condition_info' => 'RulesConditionHandlerInterface',
'event_info' => 'RulesEventHandlerInterface',
);
if (!isset($data[$hook])) {
foreach (module_implements('rules_' . $hook) as $module) {
$result = call_user_func($module . '_rules_' . $hook);
if (isset($result) && is_array($result)) {
foreach ($result as $name => $item) {
$item += array('module' => $module);
$data[$hook][$name] = $item;
}
}
}
// Support class discovery.
if (isset($discover[$hook])) {
$data[$hook] += rules_discover_plugins($discover[$hook]); // *** That's the offending line ***
}
drupal_alter('rules_'. $hook, $data[$hook]);
}
return $data[$hook];
}
Comments
Comment #1
geek-merlinDup of #2161847: Fatal error: Unsupported operand types in rules.module on line 227