Skip to content

Commit

Permalink
PHP 8 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Jan 20, 2023
1 parent 39feed0 commit 2631025
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
21 changes: 12 additions & 9 deletions Classes/Controller/SlideController.php
Expand Up @@ -48,20 +48,23 @@ public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\Conf
{
$this->configurationManager = $configurationManager;
$tsSettings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
$tsSettings = $tsSettings['plugin.']['tx_fpfractionslider.']['settings.'];
$tsSettings_pi1 = $tsSettings['plugin.']['tx_fpfractionslider_pi1.']['settings.'];
if (is_array($tsSettings_pi1)) {
if (isset($tsSettings['plugin.']['tx_fpfractionslider.']['settings.']) && is_array($tsSettings['plugin.']['tx_fpfractionslider.']['settings.'])) {
$tsSettings = $tsSettings['plugin.']['tx_fpfractionslider.']['settings.'];
} else {
$tsSettings = [];
}
if (isset($tsSettings['plugin.']['tx_fpfractionslider_pi1.']['settings.']) && is_array($tsSettings['plugin.']['tx_fpfractionslider_pi1.']['settings.'])) {
$tsSettings_pi1 = $tsSettings['plugin.']['tx_fpfractionslider_pi1.']['settings.'];
$tsSettings = array_merge($tsSettings, $tsSettings_pi1);
}
$settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
//var_dump($tsSettings);
if (isset($settings['override']) && is_array($settings['override'])) {
$overrides = $settings['override'];
unset($settings['override']);
//$settings = array_merge($tsSettings, $overrides); // übernimmt auch leere Werte :-(
if (is_array($tsSettings['fractionslider.'])) {
foreach ($tsSettings['fractionslider.'] as $key => $value) {
if (!($overrides['fractionslider'][$key] === '' || $overrides['fractionslider'][$key] === NULL || $overrides['fractionslider'][$key] == '-')) {
if (isset($overrides['fractionslider'][$key]) && !($overrides['fractionslider'][$key] === '' || $overrides['fractionslider'][$key] === NULL || $overrides['fractionslider'][$key] == '-')) {
$settings['fractionslider'][$key] = $overrides['fractionslider'][$key];
} else {
$settings['fractionslider'][$key] = $value;
Expand All @@ -70,7 +73,7 @@ public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\Conf
}
if (is_array($tsSettings['sliderpro.'])) {
foreach ($tsSettings['sliderpro.'] as $key => $value) {
if (!($overrides['sliderpro'][$key] === '' || $overrides['sliderpro'][$key] === NULL || $overrides['sliderpro'][$key] == '-')) {
if (isset($overrides['sliderpro'][$key]) && !($overrides['sliderpro'][$key] === '' || $overrides['sliderpro'][$key] === NULL || $overrides['sliderpro'][$key] == '-')) {
$settings['sliderpro'][$key] = $overrides['sliderpro'][$key];
} else {
$settings['sliderpro'][$key] = $value;
Expand All @@ -79,16 +82,16 @@ public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\Conf
}
if (is_array($tsSettings['sliderrevolution.'])) {
foreach ($tsSettings['sliderrevolution.'] as $key => $value) {
if (!($overrides['sliderrevolution'][$key] === '' || $overrides['sliderrevolution'][$key] === NULL || $overrides['sliderrevolution'][$key] == '-')) {
if (isset($overrides['sliderrevolution'][$key]) && !($overrides['sliderrevolution'][$key] === '' || $overrides['sliderrevolution'][$key] === NULL || $overrides['sliderrevolution'][$key] == '-')) {
$settings['sliderrevolution'][$key] = $overrides['sliderrevolution'][$key];
} else {
$settings['sliderrevolution'][$key] = $value;
}
}
}
if (is_array($tsSettings['more.'])) {
if (isset($tsSettings['more.']) && is_array($tsSettings['more.'])) {
foreach ($tsSettings['more.'] as $key => $value) {
if ($overrides['more'][$key]) {
if (isset($overrides['more'][$key])) {
$settings['more'][$key] = $overrides['more'][$key];
} else {
$settings['more'][$key] = $value;
Expand Down
3 changes: 2 additions & 1 deletion Classes/Hooks/PageLayoutView.php
Expand Up @@ -185,7 +185,8 @@ public function getExtensionSummary(array $params) {
$limit
];
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['fp_fractionslider']['Fixpunkt\\FpFractionslider\\Hooks\\PageLayoutView']['extensionSummary'])) {
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['fp_fractionslider']['Fixpunkt\\FpFractionslider\\Hooks\\PageLayoutView']['extensionSummary']) &&
is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['fp_fractionslider']['Fixpunkt\\FpFractionslider\\Hooks\\PageLayoutView']['extensionSummary'])) {
$params = [
'action' => $actionTranslationKey
];
Expand Down
1 change: 1 addition & 0 deletions Documentation/ChangeLog/Index.rst
Expand Up @@ -44,4 +44,5 @@ Version Changes
1.2.1 Version for TYPO3 10 and 11.
1.3.0 Replacement of the Viewhelper re:addPublicResources. It is now deprecated.
Use f:asset.css or f:asset.script instead.
1.3.2 PHP 8 bugfix.
========== =======================================================================================
8 changes: 5 additions & 3 deletions README.md
@@ -1,4 +1,4 @@
# fp_fractionslider v.1.3.1
# fp_fractionslider v.1.3.2

Professional Slider-PlugIn for TYPO3

Expand All @@ -8,5 +8,7 @@ Note: this extension does not include the JavaScript plugins. You must download
You find the manual (with links to demo pages) at typo3.org:
https://docs.typo3.org/typo3cms/extensions/fp_fractionslider/

Last change: now for TYPO3 10 and 11.
Replacement of the Viewhelper re:addPublicResources. It is now deprecated. Use f:asset.css or f:asset.script instead.
Last changes:
- Now for TYPO3 10 and 11.
- Replacement of the Viewhelper re:addPublicResources. It is now deprecated. Use f:asset.css or f:asset.script instead.
- PHP 8 bugfix.
2 changes: 1 addition & 1 deletion ext_emconf.php
Expand Up @@ -19,7 +19,7 @@
'state' => 'stable',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.3.1',
'version' => '1.3.2',
'constraints' => [
'depends' => [
'typo3' => '10.4.6-11.5.99',
Expand Down

0 comments on commit 2631025

Please sign in to comment.