Cart is a small but powerful extension which "solely" adds a shopping cart to your TYPO3 installation. The extension allows you to create coupons, products with or without variants, special prices.
Current Behavior
Opening a page with the cart plugin leads to the following exception:
PHP Warning: Undefined array key "specials" in /typo3conf/ext/cart/Classes/Service/AbstractConfigurationFromTypoScriptService.php line 51
Expected behavior/output
The cart plugin should be loaded without throwing a PHP Warning.
Environment
TYPO3 version: 12.4.16
cart version: 9.0.0
PHP version: 8.2.20
Is your TYPO3 installation set up with Composer (Composer Mode): yes
OS: Debian
Possible Solution
Change $configuration = $this->configurations[$configurationType]; in the AbstractConfigurationFromTypoScriptService.php file on line 51 to $configuration = $this->configurations[$configurationType] ?? null;
Additional context
The TYPO3 debug preset is enabled.
Bug Report
Current Behavior Opening a page with the cart plugin leads to the following exception:
PHP Warning: Undefined array key "specials" in /typo3conf/ext/cart/Classes/Service/AbstractConfigurationFromTypoScriptService.php line 51
Expected behavior/output The cart plugin should be loaded without throwing a PHP Warning.
Environment
Possible Solution Change
$configuration = $this->configurations[$configurationType];
in theAbstractConfigurationFromTypoScriptService.php
file on line 51 to$configuration = $this->configurations[$configurationType] ?? null;
Additional context The TYPO3 debug preset is enabled.