From dedd54286f6f086cb78287a5c1cd0f8cc9155984 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 10 Aug 2023 13:21:36 +0200 Subject: [PATCH] Log PDO queries, as stated in docs, but doesn't work yet (don't know the reason) --- system/libs/pot/OTS.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/libs/pot/OTS.php b/system/libs/pot/OTS.php index d20d029c..bfcfc7b5 100644 --- a/system/libs/pot/OTS.php +++ b/system/libs/pot/OTS.php @@ -372,6 +372,10 @@ class POT $this->db = new OTS_DB_MySQL($params); + global $debugBar; + $pdo = new DebugBar\DataCollector\PDO\TraceablePDO($this->db); + $debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($pdo)); + $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); }