Merge pull request #12181 from MrPetovan/bug/warnings
Address a couple of warnings
This commit is contained in:
commit
1a54fc2140
2 changed files with 2 additions and 2 deletions
|
@ -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.'));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue