Skip to content

Commit

Permalink
Merge pull request #3305 from mint-jar/fix-validation-on-content-crea…
Browse files Browse the repository at this point in the history
…tion

fix #3304 by injecting a validator on creation of conent as well.
  • Loading branch information
bobdenotter authored Aug 29, 2022
2 parents 9a34136 + a2120f1 commit fe40d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Backend/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function __construct(
/**
* @Route("/new/{contentType}", name="bolt_content_new", methods={"GET|POST"})
*/
public function new(string $contentType): Response
public function new(string $contentType, ?ContentValidatorInterface $contentValidator = null): Response
{
$content = new Content();

Expand All @@ -124,7 +124,7 @@ public function new(string $contentType): Response
$content->setPublishedAt(null);
$content->setDepublishedAt(null);

return $this->save($content);
return $this->save($content, $contentValidator);
}

return $this->edit($content);
Expand Down

0 comments on commit fe40d1e

Please sign in to comment.