diff --git a/mod/photos.php b/mod/photos.php index 95627b6da..3923bdfc8 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -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.')); } diff --git a/src/Navigation/Notifications/Repository/Notify.php b/src/Navigation/Notifications/Repository/Notify.php index 683725e4b..3891a6e25 100644 --- a/src/Navigation/Notifications/Repository/Notify.php +++ b/src/Navigation/Notifications/Repository/Notify.php @@ -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; }