mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-15 02:19:21 +02:00
Fix debugBar mysql logs (Thanks @gpedro)
This commit is contained in:
parent
dedd54286f
commit
9fef84bffe
@ -370,11 +370,14 @@ class POT
|
|||||||
throw new RuntimeException('Please install PHP pdo extension. MyAAC will not work without it.');
|
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)) {
|
||||||
global $debugBar;
|
$this->db = new DebugBar\DataCollector\PDO\TraceablePDO(new OTS_DB_MySQL($params));
|
||||||
$pdo = new DebugBar\DataCollector\PDO\TraceablePDO($this->db);
|
$debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($this->db));
|
||||||
$debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($pdo));
|
}
|
||||||
|
else {
|
||||||
|
$this->db = new OTS_DB_MySQL($params);
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user