aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/pageowner.php2
-rw-r--r--engine/lib/widgets.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index bd63d08c6..4aaffc160 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -143,7 +143,7 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
switch ($segments[1]) {
case 'owner':
case 'friends':
- $user = get_user_by_username($segments[2]);
+ $user = get_user_by_username(urldecode($segments[2]));
if ($user) {
elgg_set_ignore_access($ia);
return $user->getGUID();
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;