From 1e6520fddd36a56ae501e91928cc6fab0fd41cc6 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 26 Feb 2016 14:13:46 +0100 Subject: [PATCH] Woops, forgot to skip the / in path --- classes/File.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/File.php b/classes/File.php index 8d9ecf5195..ef4b2cfb3c 100644 --- a/classes/File.php +++ b/classes/File.php @@ -112,7 +112,8 @@ class File extends Managed_DataObject $u = parse_url($given_url); if (isset($u['host']) && $u['host'] === common_config('site', 'server')) { $r = Router::get(); - $args = $r->map(mb_substr($u['path'])); + // Skip the / in the beginning or $r->map won't match + $args = $r->map(mb_substr($u['path'], 1)); if ($args['action'] === 'attachment') { try { // $args['attachment'] should always be set if action===attachment, given our routing rules -- 2.39.5