Skip to content

Commit

Permalink
Fixing empty slug condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed Oct 19, 2023
1 parent ce967dc commit 16581d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function buildGrid(GridBuilderInterface $gridBuilder): void
$localeCode = $this->localeContext->getLocaleCode();

$slug = $request->attributes->get('slug', '');
if (!is_string($slug) && $slug !== '') {
if (!is_string($slug) || $slug !== '') {
throw new NotFoundHttpException('The request attribute "slug" must be a non empty string.');
}

Expand Down

0 comments on commit 16581d0

Please sign in to comment.