fix(db): InaccessibleMethod: Cannot access private method Doctrine\DBAL\Statement::execute from context OC\DB\PreparedStatement

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-07-01 12:54:47 +02:00
parent fb3d4d579f
commit 2d27a32870
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205

View file

@ -66,7 +66,7 @@ class PreparedStatement implements IPreparedStatement {
}
public function execute($params = null): IResult {
return ($this->result = new ResultAdapter($this->statement->execute($params)));
return ($this->result = new ResultAdapter($this->statement->executeQuery($params)));
}
public function rowCount(): int {
@ -78,6 +78,6 @@ class PreparedStatement implements IPreparedStatement {
return $this->result;
}
throw new Exception("You have to execute the prepared statement before accessing the results");
throw new \Exception("You have to execute the prepared statement before accessing the results");
}
}