diff options
Diffstat (limited to 'mod/blog/lib')
-rw-r--r-- | mod/blog/lib/blog.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 1ccfe4dc4..4dcc7d56e 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -411,8 +411,8 @@ function blog_url_forwarder($page) { global $CONFIG; // group usernames - if (substr_count("$page[0]/$page[1]", 'group:')) { - preg_match('/group\:([0-9]+)/i', "$page[0]/$page[1]", $matches); + if (substr_count(implode('/', $page), 'group:')) { + preg_match('/group\:([0-9]+)/i', implode('/', $page), $matches); $guid = $matches[1]; $entity = get_entity($guid); if ($entity) { @@ -426,6 +426,10 @@ function blog_url_forwarder($page) { } } + if (!isset($page[0])) { + return; + } + // user usernames $user = get_user_by_username($page[0]); if (!$user) { |