summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 07:22:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 07:22:42 +0000
commit3ae281d03226446a8748ff075e4f082f61bc36a9 (patch)
treeb2e46e8f5068b269c173c237615fe429fcaf82ca /includes/actions.inc
parent8b762fce57fa55a38bf2b146766298c4fb0d2377 (diff)
downloadbrdo-3ae281d03226446a8748ff075e4f082f61bc36a9.tar.gz
brdo-3ae281d03226446a8748ff075e4f082f61bc36a9.tar.bz2
#306540 by halstead, Dave Reid, jvandyk, eMPee584: Fixed Orphaned assigned actions still triggered and cannot be removed.
Diffstat (limited to 'includes/actions.inc')
-rw-r--r--includes/actions.inc10
1 files changed, 8 insertions, 2 deletions
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);