mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7222 from kinglozzer/showqueries-pdo
FIX: ?showqueries=inline failed on PDO databases (fixes #7199)
This commit is contained in:
commit
1a4211f089
@ -292,9 +292,8 @@ class DB
|
||||
// Using Injector->create allows us to use registered configurations
|
||||
// which may or may not map to explicit objects
|
||||
$conn = Injector::inst()->create($dbClass);
|
||||
$conn->connect($databaseConfig);
|
||||
|
||||
self::set_conn($conn, $label);
|
||||
$conn->connect($databaseConfig);
|
||||
|
||||
return $conn;
|
||||
}
|
||||
@ -416,7 +415,7 @@ class DB
|
||||
} elseif (is_int($next)) {
|
||||
$value = $next;
|
||||
} else {
|
||||
$value = DB::is_active() ? Convert::raw2sql($next, true) : $next;
|
||||
$value = (DB::get_conn() !== null) ? Convert::raw2sql($next, true) : $next;
|
||||
}
|
||||
$joined .= $value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user