소스 검색

Erreur 500 : Call to a member function getSlug() on null #240

develop
Guillaume Bourgeois 2 년 전
부모
커밋
692c22f8f4
1개의 변경된 파일21개의 추가작업 그리고 11개의 파일을 삭제
  1. +21
    -11
      Resolver/SectionResolver.php

+ 21
- 11
Resolver/SectionResolver.php 파일 보기

@@ -53,21 +53,31 @@ class SectionResolver

// admin
if (isset($requestAttributesArray['_firewall_context']) && $requestAttributesArray['_firewall_context'] == 'security.firewall.map.context.admin') {
if (!$this->isCachedSection) {
$currentAdminSection = null;
$userMerchant = $this->merchantResolver->getUserMerchant();

if ($userMerchant !== null) {
$currentAdminSection = $userMerchant->getCurrentAdminSection();
}
if ($this->cacheSectionCurrent) {
return $this->cacheSectionCurrent;
} elseif ($returnDefaultIfOutOfSections && $this->cacheSectionDefault) {
return $this->cacheSectionDefault;
}

$this->isCachedSection = true;
$this->section = $currentAdminSection;
$sectionCurrent = null;
$userMerchant = $this->merchantResolver->getUserMerchant();
if($userMerchant !== null) {
$sectionCurrent = $userMerchant->getCurrentAdminSection();
}

return $currentAdminSection;
} else {
return $this->section;
$sectionDefault = $this->sectionStore->setMerchant($this->merchantResolver->getCurrent())->getOneDefault();

if($sectionCurrent) {
$this->cacheSectionCurrent = $sectionCurrent;
return $sectionCurrent;
} elseif($returnDefaultIfOutOfSections && $sectionDefault) {
$this->cacheSectionDefault = $sectionDefault;
return $sectionDefault;
}

return null;
} // front
else {


Loading…
취소
저장