Skip to content

Commit

Permalink
[BUGFIX] Fixed v8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertsoft committed Jun 28, 2019
1 parent 497d245 commit c1cad75
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Classes/Extension/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
use Gilbertsoft\Lib\Extension\AbstractConfigurator;
use Gilbertsoft\ProtectedConfig\Service\InstallService;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
Expand Down Expand Up @@ -58,7 +57,7 @@ protected static function sanitizeValue(array &$conf, $value, $default)
protected static function getSanitizedExtConf($extensionKey)
{
if (class_exists('TYPO3\CMS\Core\Configuration\ExtensionConfiguration')) {
$conf = GeneralUtility::makeInstance(TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)->get($extensionKey);
$conf = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)->get($extensionKey);
} else {
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$extensionKey]);
}
Expand Down Expand Up @@ -107,7 +106,11 @@ protected static function includeConfiguration($enable, $fileName)
{
// Include configuration file
if ($enable == 1) {
$includeFile = Environment::getPublicPath() . '/' . $fileName;
if (class_exists('TYPO3\CMS\Core\Core\Environment')) {
$includeFile = \TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/' . $fileName;
} else {
$includeFile = PATH_site . $fileName;
}

if (@is_file($includeFile)) {
require $includeFile;
Expand Down

0 comments on commit c1cad75

Please sign in to comment.