From 94767f5fd1e57c80204c8f1a6fbb96764c57f561 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Oct 2022 17:09:10 +0200 Subject: [PATCH] Fix signature of begin method --- htdocs/core/db/Database.interface.php | 5 +++-- htdocs/core/db/DoliDB.class.php | 4 ++-- htdocs/debugbar/class/TraceableDB.php | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index faff7ff5172..eda21d3cd95 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -64,9 +64,10 @@ interface Database /** * Start transaction * - * @return int 1 if transaction successfuly opened or already opened, 0 if error + * @param string $textinlog Add a small text into log. '' by default. + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ - public function begin(); + public function begin($textinlog = ''); // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index c975fb5d683..2d2ea33a6c5 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -150,8 +150,8 @@ abstract class DoliDB implements Database /** * Start transaction * - * @param string $textinlog Add a small text into log. '' by default. - * @return int 1 if transaction successfuly opened or already opened, 0 if error + * @param string $textinlog Add a small text into log. '' by default. + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ public function begin($textinlog = '') { diff --git a/htdocs/debugbar/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php index 785af37fc94..0b862f4df70 100644 --- a/htdocs/debugbar/class/TraceableDB.php +++ b/htdocs/debugbar/class/TraceableDB.php @@ -102,11 +102,12 @@ class TraceableDB extends DoliDB /** * Start transaction * - * @return int 1 if transaction successfuly opened or already opened, 0 if error + * @param string $textinlog Add a small text into log. '' by default. + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ - public function begin() + public function begin($textinlog = '') { - return $this->db->begin(); + return $this->db->begin($textinlog); } /**