diff options
-rw-r--r-- | engine/lib/widgets.php | 2 |
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; |