aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-08-09 17:08:10 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-08-09 17:08:10 -0300
commit3fd1f48ef074f3041433dd6158db908a170b427b (patch)
tree43f3efd9dec6c50c84521235be75620841bd657a /engine
parent63905ad6a664fedcf1a378523ad707445d6e8b4c (diff)
downloadelgg-3fd1f48ef074f3041433dd6158db908a170b427b.tar.gz
elgg-3fd1f48ef074f3041433dd6158db908a170b427b.tar.bz2
Avoiding 'explode() expects parameter 2 to be string, array given'
Diffstat (limited to 'engine')
-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;