Problem/Motivation
Following upgrading to Drupal 10 from 9 I have started seeing a issue on one of my views caused by a integer being passed to SharedTempStore on line 111 of core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php for the owner variable.
On line 93 of the same file it checks to see if the $owner is set, finds its null then sets the $owner var to the user id, the next check to see if the user is Anon returns false resulting in a integer being set to the $owner var.
SharedTempStore then throws a TypeError and fails as it expects a Drupal\Core\Session\AccountProxyInterface.
TypeError: Drupal\Core\TempStore\SharedTempStore::__construct(): Argument #5 ($current_user) must be of type Drupal\Core\Session\AccountProxyInterface, int given, called in /var/www/html/docroot/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php on line 111 in Drupal\Core\TempStore\SharedTempStore->__construct() (line 106 of core/lib/Drupal/Core/TempStore/SharedTempStore.php).
Drupal\Core\TempStore\SharedTempStoreFactory->get('views') (Line: 71)
Drupal\views_ui\ParamConverter\ViewUIConverter->convert('dictionary_display', Array, 'view', Array) (Line: 100)
Drupal\Core\ParamConverter\ParamConverterManager->convert(Array) (Line: 45)
Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance(Array, Object) (Line: 270)
Drupal\Core\Routing\Router->applyRouteEnhancers(Array, Object) (Line: 150)
Drupal\Core\Routing\Router->matchRequest(Object) (Line: 90)
Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 105)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object)
call_user_func(Array, Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 157)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 270)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 137)
Drupal\shield\ShieldMiddleware->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
I've done some searches but not come up with anything?
Steps to reproduce
Passing an int to SharedTempStore
Proposed resolution
Not sure
Remaining tasks
Guess this may be a regression so look back to see what's changed?