Fix PDO type hint in ItemController to use global PDO class

This commit is contained in:
Edwin Noorlander 2025-11-11 18:00:45 +01:00
parent 2b21c79eff
commit ef5bf3ecca

View File

@ -143,7 +143,7 @@ class ItemController
} }
} }
private static function generateUniqueIdCode(PDO $db): string { private static function generateUniqueIdCode(\PDO $db): string {
do { do {
$code = strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 8)); $code = strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 8));
$stmt = $db->prepare('SELECT id FROM items WHERE id_code = :code'); $stmt = $db->prepare('SELECT id FROM items WHERE id_code = :code');