Issue #2575105 by alexpott: hotfix for PHP 5 test failures in ShutdownFunctionsTest
parent
04a706f63d
commit
8861a546b8
|
@ -1033,8 +1033,12 @@ function _drupal_shutdown_function() {
|
||||||
chdir(DRUPAL_ROOT);
|
chdir(DRUPAL_ROOT);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
foreach ($callbacks as &$callback) {
|
reset($callbacks);
|
||||||
|
// Do not use foreach() here because it is possible that the callback will
|
||||||
|
// add to the $callbacks array via drupal_register_shutdown_function().
|
||||||
|
while ($callback = current($callbacks)) {
|
||||||
call_user_func_array($callback['callback'], $callback['arguments']);
|
call_user_func_array($callback['callback'], $callback['arguments']);
|
||||||
|
next($callbacks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// PHP 7 introduces Throwable, which covers both Error and
|
// PHP 7 introduces Throwable, which covers both Error and
|
||||||
|
|
Loading…
Reference in New Issue