]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Woops, forgot to skip the / in path
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 26 Feb 2016 13:13:46 +0000 (14:13 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 26 Feb 2016 13:13:46 +0000 (14:13 +0100)
classes/File.php

index 8d9ecf5195abf0d3c1a40d287fa075b6e753acd5..ef4b2cfb3c75d9667cf7c3742279cdf7b0d6723c 100644 (file)
@@ -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