use the correct function

This commit is contained in:
El RIDO 2022-01-23 07:11:36 +01:00
parent 83336b2949
commit 47deaeb7ca
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -548,11 +548,11 @@ class Database extends AbstractData
foreach ($params as $key => $parameter) { foreach ($params as $key => $parameter) {
$position = $key + 1; $position = $key + 1;
if (is_int($parameter)) { if (is_int($parameter)) {
$statement->bindParam($position, $parameter, PDO::PARAM_INT); $statement->bindValue($position, $parameter, PDO::PARAM_INT);
} elseif ($length = strlen($parameter) >= 4000) { } elseif ($length = strlen($parameter) >= 4000) {
$statement->bindParam($position, $parameter, PDO::PARAM_STR, $length); $statement->bindValue($position, $parameter, PDO::PARAM_STR, $length);
} else { } else {
$statement->bindParam($position, $parameter); $statement->bindValue($position, $parameter);
} }
} }
$result = $statement->execute(); $result = $statement->execute();