Bug Report
Current Behavior
everytime a null object is tried to unserialize this exception occures.
for example, when calling the cart this exception is thrown:
PHP Runtime Deprecation Notice: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /var/website/current/html/typo3conf/ext/cart/Classes/Controller/Cart/CartController.php line 64
Environment
- TYPO3 version(s): 11.5.7
- cart version: 8.2.0
- PHP: 8.1
- Is your TYPO3 installation set up with Composer (Composer Mode): yes
- OS: Debian
Possible Solution
check objects against null before unserialize them like $billingAddress = unserialize($sessionData); would be transformed to $billingAddress = is_null($sessionData) ? null : unserialize($billingAddress);
found sofar inside CartController.php for
$shippingAddress = unserialize($sessionData);
$billingAddress = unserialize($sessionData);