Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

The public scan method on \Drupal\Core\Utility\Token previously accepted any variable including NULL but only works if passed a string.

Calling that method with anything other than a string has been deprecated in Drupal 10. Drupal 11 will introduce a typehint on that method.

Impacts: 
Module developers
Themers
Site templates, recipes and distribution developers