Merge pull request #5267 from miqrogroove/patch-2

Allow for Integer Literals in PDO Database Driver
This commit is contained in:
Michael Vogel 2018-06-21 18:51:01 +02:00 committed by GitHub
commit 4b0cf8d60f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,7 +427,12 @@ class dba {
}
foreach ($args AS $param => $value) {
$stmt->bindParam($param, $args[$param]);
if (is_int($args[$param])) {
$data_type = PDO::PARAM_INT;
} else {
$data_type = PDO::PARAM_STR;
}
$stmt->bindParam($param, $args[$param], $data_type);
}
if (!$stmt->execute()) {