mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 11:13:27 +02:00
Squashed commit of the following:
commit94a61f32ae
Merge:57772569
8227303b
Author: slawkens <slawkens@gmail.com> Date: Sat Nov 11 11:11:13 2023 +0100 Merge branch 'develop' into feature/debug-bar commit577725690d
Author: slawkens <slawkens@gmail.com> Date: Mon Aug 21 11:08:12 2023 +0200 Add option to enable debugbar, even if dev mode is disabled commitc227fd4e96
Merge:9fef84bf
a692607c
Author: slawkens <slawkens@gmail.com> Date: Mon Aug 21 10:20:04 2023 +0200 Merge branch 'develop' into feature/debug-bar commit9fef84bffe
Author: slawkens <slawkens@gmail.com> Date: Fri Aug 11 06:39:50 2023 +0200 Fix debugBar mysql logs (Thanks @gpedro) commitdedd54286f
Author: slawkens <slawkens@gmail.com> Date: Thu Aug 10 13:21:36 2023 +0200 Log PDO queries, as stated in docs, but doesn't work yet (don't know the reason) commit7403a24030
Author: slawkens <slawkens@gmail.com> Date: Thu Aug 10 13:21:20 2023 +0200 Use dev-master, cause of some bugs appearing commitcc7aec8e28
Author: slawkens <slawkens@gmail.com> Date: Thu Aug 10 13:05:02 2023 +0200 Init debugBar
This commit is contained in:
@@ -370,7 +370,14 @@ class POT
|
||||
throw new RuntimeException('Please install PHP pdo extension. MyAAC will not work without it.');
|
||||
}
|
||||
|
||||
$this->db = new OTS_DB_MySQL($params);
|
||||
global $debugBar;
|
||||
if (isset($debugBar)) {
|
||||
$this->db = new DebugBar\DataCollector\PDO\TraceablePDO(new OTS_DB_MySQL($params));
|
||||
$debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($this->db));
|
||||
}
|
||||
else {
|
||||
$this->db = new OTS_DB_MySQL($params);
|
||||
}
|
||||
|
||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
|
Reference in New Issue
Block a user