From 3ae281d03226446a8748ff075e4f082f61bc36a9 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 7 Mar 2010 07:22:42 +0000 Subject: #306540 by halstead, Dave Reid, jvandyk, eMPee584: Fixed Orphaned assigned actions still triggered and cannot be removed. --- includes/actions.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'includes/actions.inc') diff --git a/includes/actions.inc b/includes/actions.inc index 3a73c671b..8ca1e86c2 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -129,7 +129,13 @@ function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a } // Singleton action; $action_ids is the function name. else { - $actions_result[$action_ids] = $action_ids($object, $context, $a1, $a2); + if (function_exists($action_ids)) { + $actions_result[$action_ids] = $action_ids($object, $context, $a1, $a2); + } + else { + // Set to avoid undefined index error messages later. + $actions_result[$action_ids] = FALSE; + } } } $stack--; @@ -153,7 +159,7 @@ function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a * @see hook_action_info() */ function actions_list($reset = FALSE) { - static $actions; + $actions = &drupal_static(__FUNCTION__); if (!isset($actions) || $reset) { $actions = module_invoke_all('action_info'); drupal_alter('action_info', $actions); -- cgit v1.2.3