mirror of
https://github.com/openvk/openvk
synced 2025-01-29 02:55:27 +03:00
fix(wall): 500 error xd
This commit is contained in:
parent
0a3231e8ef
commit
3afb44fd89
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
function renderWall(int $user, bool $embedded = false): void
|
function renderWall(int $user, bool $embedded = false): void
|
||||||
{
|
{
|
||||||
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
$owner = ($user < 0 ? (new Clubs) : (new Users))->get(abs($user));
|
||||||
if ($owner->isBanned() || $owner->isDeleted() || !$owner->canBeViewedBy($this->user->identity))
|
if ($owner->isBanned() || !$owner->canBeViewedBy($this->user->identity))
|
||||||
|
$this->flashFail("err", tr("error"), tr("forbidden"));
|
||||||
|
|
||||||
|
if ($user > 0 && $owner->isDeleted())
|
||||||
$this->flashFail("err", tr("error"), tr("forbidden"));
|
$this->flashFail("err", tr("error"), tr("forbidden"));
|
||||||
|
|
||||||
if(is_null($this->user)) {
|
if(is_null($this->user)) {
|
||||||
|
|
Loading…
Reference in a new issue