Commit 0e989e2e authored by catch's avatar catch

Issue #2403117 by alexpott: Remove unnecessary function_exists in ModuleHandler::invokeAll

parent a042df2e
......@@ -392,14 +392,12 @@ public function invokeAll($hook, array $args = array()) {
$implementations = $this->getImplementations($hook);
foreach ($implementations as $module) {
$function = $module . '_' . $hook;
if (function_exists($function)) {
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = NestedArray::mergeDeep($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = NestedArray::mergeDeep($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment