Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated

Created on 2 March 2023, over 1 year ago
Updated 2 June 2023, about 1 year ago

Can you help to write a patch for this error message (PHP 8.1)?

Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in Drupal\Component\Serialization\PhpSerialize::decode() (line 21 of core/lib/Drupal/Component/Serialization/PhpSerialize.php).
Drupal\Component\Serialization\PhpSerialize::decode(NULL) (Line: 193)
Drupal\amazon_product_widget\ProductStore->getMultipleWithOverrides(Array) (Line: 239)
Drupal\amazon_product_widget\ProductService->getProductData(Array) (Line: 795)
Drupal\amazon_product_widget\ProductService->getProductsWithFallback(Object, Object) (Line: 736)
Drupal\amazon_product_widget\ProductService->buildProductsWithFallback(Object, Object) (Line: 144)
Drupal\amazon_product_widget\Controller\AmazonProductController->get(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 686)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

๐Ÿ› Bug report
Status

Fixed

Version

1.5

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡นAustria drupalfan2

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024