Przeglądaj źródła

Correctif mineur

packProduct
Fabien Normand 3 lat temu
rodzic
commit
33275b590f
1 zmienionych plików z 4 dodań i 0 usunięć
  1. +4
    -0
      Resolver/SectionResolver.php

+ 4
- 0
Resolver/SectionResolver.php Wyświetl plik

@@ -11,6 +11,7 @@ use Lc\CaracoleBundle\Repository\Section\SectionRepository;
use Lc\CaracoleBundle\Repository\Section\SectionStore;
use Lc\SovBundle\Resolver\UrlResolver;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Security;

class SectionResolver
@@ -94,6 +95,9 @@ class SectionResolver
$sectionCurrent = $sectionStore
->setMerchant($merchantCurrent)
->getOneBySlug($requestAttributesArray['section']);
if($sectionCurrent===null){
throw new NotFoundHttpException('Aucun espace n\'a été trouvé');
}
}

if ($sectionCurrent) {

Ładowanie…
Anuluj
Zapisz