Commit 0bdd86b4 authored by Dries's avatar Dries

- Patch #290282 by jvandyk, kratib: correct tracking of recursion.

parent af1a0db7
......@@ -38,6 +38,7 @@
* performs the action, keyed on action ID.
*/
function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a2 = NULL) {
// $stack tracks the number of recursive calls.
static $stack;
$stack++;
if ($stack > variable_get('actions_max_stack', 35)) {
......@@ -101,6 +102,7 @@ function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a
$result[$action_ids] = $action_ids($object, $context, $a1, $a2);
}
}
$stack--;
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