]> git.mxchange.org Git - friendica.git/commitdiff
Apply suggestions from code review
authorMichael Vogel <icarus@dabo.de>
Mon, 4 Oct 2021 19:06:13 +0000 (21:06 +0200)
committerGitHub <noreply@github.com>
Mon, 4 Oct 2021 19:06:13 +0000 (21:06 +0200)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Module/Photo.php

index 9ee737d3829db17036c481002e99f40913f12234..3b59e5b889b4210110f80ca996a34f5a5370287f 100644 (file)
@@ -83,7 +83,7 @@ class Photo extends BaseModule
                        }
 
                        if (!empty($parameters['guid'])) {
-                               $guid = pathinfo($parameters['guid'], PATHINFO_FILENAME);
+                               $guid = $parameters['guid'];
                                $account = DBA::selectFirst('account-user-view', ['id'], ['guid' => $guid], ['order' => ['uid' => true]]);
                                if (empty($account)) {
                                        throw new HTTPException\NotFoundException();
@@ -92,8 +92,9 @@ class Photo extends BaseModule
                                $id = $account['id'];
                        }
 
+                       // Contact Id Fallback, to remove after version 2021.12
                        if (!empty($parameters['contact_id'])) {
-                               $id = intval(pathinfo($parameters['contact_id'], PATHINFO_FILENAME));
+                               $id = intval($parameters['contact_id']);
                        }
 
                        if (!empty($parameters['nickname_ext'])) {