Browse Source

Minor change for post traits

Visman 4 years ago
parent
commit
d723f13f82
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/Models/Pages/PostFormTrait.php
  2. 1 1
      app/Models/Pages/PostValidatorTrait.php

+ 1 - 1
app/Models/Pages/PostFormTrait.php

@@ -18,7 +18,7 @@ trait PostFormTrait
     /**
      * Возвращает данные для построения формы создания темы/сообщения
      */
-    protected function messageForm(Model $model, string $marker, array $args, bool $edit, bool $first, bool $quick): array
+    protected function messageForm(?Model $model, string $marker, array $args, bool $edit, bool $first, bool $quick): array
     {
         $vars = $args['_vars'] ?? null;
 

+ 1 - 1
app/Models/Pages/PostValidatorTrait.php

@@ -98,7 +98,7 @@ trait PostValidatorTrait
     /**
      * Подготовка валидатора к проверке данных из формы создания темы/сообщения
      */
-    protected function messageValidator(Model $model, string $marker, array $args, bool $edit, bool $first): Validator
+    protected function messageValidator(?Model $model, string $marker, array $args, bool $edit, bool $first): Validator
     {
         $this->c->Lang->load('validator');