From 2d27a328702bd2ce3c9260ced84af6a538759dec Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 1 Jul 2024 12:54:47 +0200 Subject: [PATCH] fix(db): InaccessibleMethod: Cannot access private method Doctrine\DBAL\Statement::execute from context OC\DB\PreparedStatement Signed-off-by: Joas Schilling --- lib/private/DB/PreparedStatement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/DB/PreparedStatement.php b/lib/private/DB/PreparedStatement.php index 5fdfa2b03e8..9ff02c105e3 100644 --- a/lib/private/DB/PreparedStatement.php +++ b/lib/private/DB/PreparedStatement.php @@ -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"); } }