Fix PDO type hint in ItemController to use global PDO class
This commit is contained in:
parent
2b21c79eff
commit
ef5bf3ecca
@ -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');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user