]> git.mxchange.org Git - friendica.git/commitdiff
Suppress warning when /phots route is used without a nickname
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 15 Nov 2022 14:04:12 +0000 (09:04 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 15 Nov 2022 14:04:12 +0000 (09:04 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1314964388

mod/photos.php

index 95627b6da474653d350ac214b594c3f1661c31b1..3923bdfc89bf1282e3145b0f00db19be6a6174d3 100644 (file)
@@ -788,7 +788,7 @@ function photos_content(App $a)
        // photos/name/image/xxxxx/edit
        // photos/name/image/xxxxx/drop
 
-       $user = User::getByNickname(DI::args()->getArgv()[1]);
+       $user = User::getByNickname(DI::args()->getArgv()[1] ?? '');
        if (!DBA::isResult($user)) {
                throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
        }