mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(db): TooManyArguments: Too many arguments for method Doctrine\DBAL\Statement::executeQuery()
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4bbaae5798
commit
2b83016a2b
1 changed files with 11 additions and 1 deletions
|
|
@ -66,7 +66,17 @@ class PreparedStatement implements IPreparedStatement {
|
|||
}
|
||||
|
||||
public function execute($params = null): IResult {
|
||||
return ($this->result = new ResultAdapter($this->statement->executeQuery($params)));
|
||||
if ($params !== null) {
|
||||
foreach ($params as $key => $param) {
|
||||
if (is_int($key)) {
|
||||
// Parameter count starts with 1
|
||||
$this->bindValue($key + 1, $param);
|
||||
} else {
|
||||
$this->bindValue($key, $param);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($this->result = new ResultAdapter($this->statement->executeQuery()));
|
||||
}
|
||||
|
||||
public function rowCount(): int {
|
||||
|
|
|
|||
Loading…
Reference in a new issue