From 790875d8be33ac5a217738e25798b4c1eba45fa7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 4 Oct 2021 21:06:13 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hypolite Petovan --- src/Module/Photo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 9ee737d38..3b59e5b88 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -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'])) {