mirror of
https://github.com/friendica/friendica
synced 2024-11-10 02:22:55 +00:00
Merge pull request #5267 from miqrogroove/patch-2
Allow for Integer Literals in PDO Database Driver
This commit is contained in:
commit
4b0cf8d60f
1 changed files with 6 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue