Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0e989e2e
Commit
0e989e2e
authored
Jan 12, 2015
by
catch
Browse files
Issue
#2403117
by alexpott: Remove unnecessary function_exists in ModuleHandler::invokeAll
parent
a042df2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Extension/ModuleHandler.php
View file @
0e989e2e
...
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment