aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/widgets.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/widgets.php')
-rw-r--r--engine/lib/widgets.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 699462a1b..86b3e8219 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -158,7 +158,7 @@ function elgg_register_widget_type($handler, $name, $description, $context = "al
$handlerobj = new stdClass;
$handlerobj->name = $name;
$handlerobj->description = $description;
- $handlerobj->context = explode(",", $context);
+ $handlerobj->context = is_array($context) ? $context : explode(",", $context);
$handlerobj->multiple = $multiple;
$CONFIG->widgets->handlers[$handler] = $handlerobj;