From dd6c20780b8696fe058220d8f69bcecc5fb53ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 18 Jan 2026 22:53:37 +0100 Subject: [PATCH] Ensure that the ids passed to DBElementRepository::findByIDInMatchingOrder are all ints This might help to diagnose #1188 --- src/Repository/DBElementRepository.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Repository/DBElementRepository.php b/src/Repository/DBElementRepository.php index 2437e848..f737d91d 100644 --- a/src/Repository/DBElementRepository.php +++ b/src/Repository/DBElementRepository.php @@ -109,6 +109,13 @@ class DBElementRepository extends EntityRepository return []; } + //Ensure that all IDs are integers and none is null + foreach ($ids as $id) { + if (!is_int($id)) { + throw new \InvalidArgumentException('Non-integer ID given to findByIDInMatchingOrder: ' . var_export($id, true)); + } + } + $cache_key = implode(',', $ids); //Check if the result is already cached