Skip to content

Commit

Permalink
[TASK] Fixed deprecation warning.
Browse files Browse the repository at this point in the history
Accessing sys_language_isocode in TYPO3 v10 is deprecated and removed in TYPO3 v11.

Fixes #12.
  • Loading branch information
rvock committed Sep 25, 2023
1 parent 135ca22 commit deb7ba9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/Controller/FormcycleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ protected function getFcUrl(FcHelper $fch, $fcParams = '')
$useui = $this->settings['xf']['useFcjQueryUi'];
$usebs = $this->settings['xf']['useFcBootStrap'];
$selProjectId = $this->settings['xf']['xfc_p_id'];
$frontendLang = $GLOBALS['TSFE']->sys_language_isocode ?: 'de';
if (version_compare(TYPO3_version, '10.0.0', '>=')) {
$frontendLang = $GLOBALS['TSFE']->getLanguage()->getTwoLetterIsoCode() ?: 'de';
} else {
$frontendLang = $GLOBALS['TSFE']->sys_language_isocode ?: 'de';
}
$fcParams .= $this->settings['xf']['useFcUrlParams'];

$fcParams = $this->resolveCustomParameters($fcParams);
Expand Down

0 comments on commit deb7ba9

Please sign in to comment.