Merge pull request #12181 from MrPetovan/bug/warnings

Address a couple of warnings
This commit is contained in:
Michael Vogel 2022-11-15 17:58:24 +01:00 committed by GitHub
commit 1a54fc2140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View 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.'));
}

View File

@ -531,7 +531,7 @@ class Notify extends BaseRepository
// Ensure that the important fields are set at any time
$fields = ['nickname', 'account_removed', 'account_expired'];
$user = Model\User::getById($params['uid'], $fields);
if ($user['account_removed'] || $user['user_expired']) {
if ($user['account_removed'] || $user['account_expired']) {
return false;
}