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 f4f1f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public function buildGrid(GridBuilderInterface $gridBuilder): void
$localeCode = $this->localeContext->getLocaleCode();

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

// @see Sylius\Bundle\ResourceBundle\ExpressionLanguage\NotNullExpressionFunctionProvider
Expand Down

0 comments on commit f4f1f77

Please sign in to comment.