Call to undefined method Drupal\Core\Session\AccountProxy::ui() messages is watchdog

Created on 18 December 2023, about 1 year ago

Problem/Motivation

Once in a while I see these in watchdog

Message	Error: Call to undefined method Drupal\Core\Session\AccountProxy::ui() in Drupal\timezone_detect\Controller\SetTimezoneController->updateTimezone() (line 88 of /var/www/vhosts/..../web/modules/contrib/timezone_detect/src/Controller/SetTimezoneController.php)
#0 [internal function]: Drupal\timezone_detect\Controller\SetTimezoneController->updateTimezone()
#1 /var/www/vhosts/..../web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#2 /var/www/vhosts/..../web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#3 /var/www/vhosts/..../web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()

The code in the error logger should be to $account->id() not $account->ui()

Will provide a patch

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

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