From 0bdd86b4061c933709348ae616ce1121c4680259 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 2 Oct 2008 02:06:00 +0000 Subject: - Patch #290282 by jvandyk, kratib: correct tracking of recursion. --- includes/actions.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'includes/actions.inc') diff --git a/includes/actions.inc b/includes/actions.inc index 69971d84a..ae94ffe86 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -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; } -- cgit v1.2.3