From 67b725cb65548dd5a39f16385dac7e80a47a5ff5 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 31 Oct 2023 10:21:52 +0900 Subject: [PATCH] DB\IO fixes for logging --- src/DB/IO.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DB/IO.php b/src/DB/IO.php index f0e8173..aeccd67 100644 --- a/src/DB/IO.php +++ b/src/DB/IO.php @@ -1186,7 +1186,7 @@ class IO */ private function __dbDebugPrepareContext(string $query, array $params = []): array { - if ($this->params === []) { + if ($params === []) { return []; } $error_data = [ @@ -2411,6 +2411,8 @@ class IO // set the query $this->cursor_ext[$query_hash]['query'] = $query; + // set the query parameters + $this->cursor_ext[$query_hash]['params'] = $params; // before doing ANYTHING check if query is "SELECT ..." everything else does not work if (!$this->dbCheckQueryForSelect($this->cursor_ext[$query_hash]['query'])) { $this->__dbError(17, false, context: [ @@ -2420,8 +2422,6 @@ class IO ]); return false; } - // set the query parameters - $this->cursor_ext[$query_hash]['params'] = $params; // QUERY PARAMS: run query params check and rewrite if ($this->dbGetConvertPlaceholder() === true) { try {