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) {
}
}
+ if (!isset($page[0])) {
+ return;
+ }
+
// user usernames
$user = get_user_by_username($page[0]);
if (!$user) {