Errors regarding time zones when calling webhook

Created on 2 November 2023, about 1 year ago
Updated 2 January 2024, 11 months ago

Problem/Motivation

I got notified by wallee that the webhook fails. Looking at the log I found these errors:

Deprecated function: DateTimeZone::__construct(): Passing null to parameter #1 ($timezone) of type string is deprecated in Drupal\commerce_wallee\Services\PaymentSdk->webhookTokenVersion() (line 691 of /app/web/modules/contrib/commerce_wallee/src/Services/PaymentSdk.php) #0 /app/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /app/web/modules/contrib/commerce_wallee/src/Services/PaymentSdk.php(691): DateTimeZone->__construct()
#3 /app/web/modules/contrib/commerce_wallee/src/Controller/WebhookController.php(105): Drupal\commerce_wallee\Services\PaymentSdk->webhookTokenVersion()
#4 /app/web/modules/contrib/commerce_wallee/src/Controller/WebhookController.php(79): Drupal\commerce_wallee\Controller\WebhookController->updateTokenVersion()
#5 [internal function]: Drupal\commerce_wallee\Controller\WebhookController->content()
#6 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#7 /app/web/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#9 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#10 /app/vendor/symfony/http-kernel/HttpKernel.php(182): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /app/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#12 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#13 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#14 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#15 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#16 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#17 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#18 /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#19 /app/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#20 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#21 {main}.

Exception: DateTimeZone::__construct(): Unknown or bad timezone () in DateTimeZone->__construct() (line 691 of /app/web/modules/contrib/commerce_wallee/src/Services/PaymentSdk.php).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇭Switzerland Lukas von Blarer

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024