diff --git a/Web/Presenters/NotesPresenter.php b/Web/Presenters/NotesPresenter.php index 11c2e835..0353354d 100644 --- a/Web/Presenters/NotesPresenter.php +++ b/Web/Presenters/NotesPresenter.php @@ -54,6 +54,10 @@ final class NotesPresenter extends OpenVKPresenter $this->notFound(); if($_SERVER["REQUEST_METHOD"] === "POST") { + if(empty($this->postParam("name"))) { + $this->flashFail("err", tr("error"), tr("error_segmentation")); + } + $note = new Note; $note->setOwner($this->user->id); $note->setCreated(time()); diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index 9e842255..15438bdd 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -68,6 +68,9 @@ final class PhotosPresenter extends OpenVKPresenter } if($_SERVER["REQUEST_METHOD"] === "POST") { + if(empty($this->postParam("name"))) { + $this->flashFail("err", tr("error"), tr("error_segmentation")); + } $album = new Album; $album->setOwner(isset($club) ? $club->getId() * -1 : $this->user->id); $album->setName($this->postParam("name"));