mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 16:49:34 +00:00
Ensure that the ids passed to DBElementRepository::findByIDInMatchingOrder are all ints
This might help to diagnose #1188
This commit is contained in:
parent
09cc2ba8ff
commit
dd6c20780b
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue