From 3fd1f48ef074f3041433dd6158db908a170b427b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 9 Aug 2013 17:08:10 -0300 Subject: Avoiding 'explode() expects parameter 2 to be string, array given' --- engine/lib/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/lib/widgets.php') 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; -- cgit v1.2.3