bug fixed (Fatal error: Uncaught Krugozor\Database\Mysql\Exception: Попытка указать для заполнителя типа integer значение типа string в шаблоне запроса SELECT * FROM users WHERE id = ?i OR login = "?s")

This commit is contained in:
Igor Barkov (iwork) 2020-07-03 19:21:57 +03:00
parent cf2ab2b98d
commit 16a2b0e5da

View File

@ -34,7 +34,7 @@ class User
public function __construct($user)
{
$user_query = db::c()->query('SELECT * FROM users WHERE id = ?i OR login = "?s"', $user, $user)->fetch_assoc();
$user_query = db::c()->query('SELECT * FROM users WHERE id = "?s" OR login = "?s"', $user, $user)->fetch_assoc();
foreach ($this as $key => $value) {
if (isset($user_query[$key])) {
$this->$key = $user_query[$key];