diff options
Diffstat (limited to 'engine/lib/widgets.php')
-rw-r--r-- | engine/lib/widgets.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php index d73dd6330..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; @@ -336,7 +336,7 @@ function elgg_default_widgets_init() { * * @param string $event The event * @param string $type The type of object - * @param object $entity The entity being created + * @param ElggEntity $entity The entity being created * @return void * @access private */ @@ -372,6 +372,7 @@ function elgg_create_default_widgets($event, $type, $entity) { ); $widgets = elgg_get_entities_from_private_settings($options); + /* @var ElggWidget[] $widgets */ foreach ($widgets as $widget) { // change the container and owner |