Commit bbe2e847 authored by Dries's avatar Dries

- Patch #296302 by chx: remove PHP 5.1 hack now the minimum requirement is PHP 5.2.

parent 553d8885
......@@ -412,13 +412,7 @@ function module_implements($hook, $sort = FALSE, $refresh = FALSE) {
}
registry_cache_hook_implementations(array('hook' => $hook, 'modules' => $implementations[$hook]));
// The explicit cast forces a copy to be made. This is needed because
// $implementations[$hook] is only a reference to an element of
// $implementations and if there are nested foreaches (due to nested node
// API calls, for example), they would both manipulate the same array's
// references, which causes some modules' hooks not to be called.
// See also http://www.zend.com/zend/art/ref-count.php.
return (array)$implementations[$hook];
return $implementations[$hook];
}
/**
......
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