瀏覽代碼

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Guillaume 3 年之前
父節點
當前提交
8d46cfff26
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      Resolver/SectionResolver.php

+ 4
- 0
Resolver/SectionResolver.php 查看文件

@@ -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) {

Loading…
取消
儲存