Skip to content
Snippets Groups Projects
Commit eedfe151 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[TASK] Check for the existence of the project_base to prevent crashes

parent 8d64861f
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\ImmediateResponseException;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Site\SiteFinder;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
......@@ -289,8 +290,11 @@ class JoblistController extends ActionController {
$site = GeneralUtility::makeInstance(SiteFinder::class)
->getSiteByPageId($GLOBALS['TSFE']->id)
->getLanguageById($sysLanguageUid);
$countryRepository = $this->objectManager->get(CountryRepository::class);
$countries = $countryRepository->findAllOrderedByLanguage($site->getTwoLetterIsoCode());
$countries = [];
if (ExtensionManagementUtility::isLoaded('project_base')) {
$countryRepository = $this->objectManager->get(CountryRepository::class);
$countries = $countryRepository->findAllOrderedByLanguage($site->getTwoLetterIsoCode());
}
$this->view->assign('countries', $countries);
$this->view->assign('sysLanguageUid', $sysLanguageUid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment