summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index d1c78f7d0..8381bc63c 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1698,7 +1698,8 @@ function common_url_to_nickname($url)
# Strip starting, ending slashes
$path = preg_replace('@/$@', '', $parts['path']);
$path = preg_replace('@^/@', '', $path);
- if (strpos($path, '/') === false) {
+ $path = basename($path);
+ if ($path) {
return common_nicknamize($path);
}
}