Ensure that the ids passed to DBElementRepository::findByIDInMatchingOrder are all ints

This might help to diagnose #1188
This commit is contained in:
Jan Böhmer 2026-01-18 22:53:37 +01:00
parent 09cc2ba8ff
commit dd6c20780b

View file

@ -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