Quellcode durchsuchen

Section resolver exepction

feature/ticket
Fab vor 3 Jahren
Ursprung
Commit
52ec4952e6
1 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
  1. +7
    -3
      Resolver/SectionResolver.php

+ 7
- 3
Resolver/SectionResolver.php Datei anzeigen

@@ -29,13 +29,17 @@ class SectionResolver
$currentAdminSection = null;
$userMerchant = $this->merchantResolver->getUserMerchant();

if($userMerchant!==null){
if ($userMerchant !== null) {
$currentAdminSection = $userMerchant->getCurrentAdminSection();
}

if($currentAdminSection === null){
$currentAdminSection = $this->sectionRepository->findOneBy(array('isDefault'=>true));
if ($currentAdminSection === null) {
$currentAdminSection = $this->sectionRepository->findOneBy(array('isDefault' => true));
if ($currentAdminSection === null) {
throw new \ErrorException('Aucune section par défaut définie pour ce merchant');
}
}

return $currentAdminSection;
}


Laden…
Abbrechen
Speichern