summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-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);