summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/actions.inc')
-rw-r--r--includes/actions.inc2
1 files changed, 2 insertions, 0 deletions
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;
}