This is the correct way:
<?php if (!isset($foo['account_removed) || $foo['account_removed']) ?>
This commit is contained in:
parent
4e5179a7b3
commit
cf8698afe6
3 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ function photos_init(App $a) {
|
||||||
|
|
||||||
if (DI::args()->getArgc() > 1) {
|
if (DI::args()->getArgc() > 1) {
|
||||||
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]);
|
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]);
|
||||||
if (empty($owner) || $owner['account_removed']) {
|
if (!isset($owner['account_removed']) || $owner['account_removed']) {
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ HELP;
|
||||||
* @return bool True, if the delete was successful
|
* @return bool True, if the delete was successful
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function deleteUser()
|
private function deleteUser(): bool
|
||||||
{
|
{
|
||||||
$user = $this->getUserByNick(1);
|
$user = $this->getUserByNick(1);
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ class Profile
|
||||||
public static function load(App $a, string $nickname, bool $show_contacts = true)
|
public static function load(App $a, string $nickname, bool $show_contacts = true)
|
||||||
{
|
{
|
||||||
$profile = User::getOwnerDataByNick($nickname);
|
$profile = User::getOwnerDataByNick($nickname);
|
||||||
if (empty($profile) || !isset($profile['account_removed']) || $profile['account_removed']) {
|
if (!isset($profile['account_removed']) || $profile['account_removed']) {
|
||||||
Logger::info('profile error: ' . DI::args()->getQueryString());
|
Logger::info('profile error: ' . DI::args()->getQueryString());
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue