joooo_aah → created an issue.
Same here when creating new user (user has computed string field which sums up the flags). Variable $string is a big array/object
TypeError: addcslashes(): Argument #1 ($string) must be of type string, Drupal\Core\Session\AccountProxy given in addcslashes() (line 1525 of core/lib/Drupal/Core/Database/Connection.php).
addcslashes() (Line: 1525)
Drupal\Core\Database\Connection->escapeLike() (Line: 431)
Drupal\Core\Database\Query\Select->escapeLike() (Line: 125)
Drupal\Core\Entity\Query\Sql\Condition::translateCondition() (Line: 70)
Drupal\Core\Entity\Query\Sql\Condition->compile() (Line: 177)
Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 81)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 203)
Drupal\flag\FlagService->getEntityFlaggings() (Line: 96)
Drupal\flag\FlagService->getFlagging() (Line: 115)
Using Flag 4.0@beta, and Drupal core 9.5.8