Skip to content

Commit

Permalink
Update src/Controller/BlockAdminController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Jul 25, 2022
1 parent dd60d3b commit 6fe6c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/BlockAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function createAction(Request $request): Response
$this->admin->checkAccess('create');

$sharedBlockAdminClass = $this->getParameter('sonata.page.admin.shared_block.class');
if ($this->admin->isChild() && \get_class($this->admin) !== $sharedBlockAdminClass) {
if (!$this->admin->isChild() && \get_class($this->admin) !== $sharedBlockAdminClass) {
throw new PageNotFoundException('You cannot create a block without a page');
}

Expand Down

0 comments on commit 6fe6c1b

Please sign in to comment.