Merge pull request #614 from albig/fix-613
Check for extension configuration before access.
This commit is contained in:
commit
72a27b9def
|
@ -132,7 +132,10 @@ abstract class AbstractModule extends \TYPO3\CMS\Backend\Module\BaseScriptClass
|
|||
public function __construct()
|
||||
{
|
||||
$GLOBALS['LANG']->includeLLFile('EXT:' . $this->extKey . '/Resources/Private/Language/' . Helper::getUnqualifiedClassName(get_class($this)) . '.xml');
|
||||
$this->conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);
|
||||
// Read extension configuration.
|
||||
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$this->extKey]) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$this->extKey])) {
|
||||
$this->conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);
|
||||
}
|
||||
$this->data = GeneralUtility::_GPmerged($this->prefixId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,14 +113,11 @@ abstract class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
|
|||
$conf = Helper::mergeRecursiveWithOverrule($generalConf, $conf);
|
||||
}
|
||||
// Read extension configuration.
|
||||
$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);
|
||||
if (is_array($extConf)) {
|
||||
$conf = Helper::mergeRecursiveWithOverrule($extConf, $conf);
|
||||
}
|
||||
// Read TYPO3_CONF_VARS configuration.
|
||||
$varsConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey];
|
||||
if (is_array($varsConf)) {
|
||||
$conf = Helper::mergeRecursiveWithOverrule($varsConf, $conf);
|
||||
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$this->extKey]) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$this->extKey])) {
|
||||
$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);
|
||||
if (is_array($extConf)) {
|
||||
$conf = Helper::mergeRecursiveWithOverrule($extConf, $conf);
|
||||
}
|
||||
}
|
||||
$this->conf = $conf;
|
||||
// Set default plugin variables.
|
||||
|
|
Loading…
Reference in New Issue