mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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
|
// Using Injector->create allows us to use registered configurations
|
||||||
// which may or may not map to explicit objects
|
// which may or may not map to explicit objects
|
||||||
$conn = Injector::inst()->create($dbClass);
|
$conn = Injector::inst()->create($dbClass);
|
||||||
$conn->connect($databaseConfig);
|
|
||||||
|
|
||||||
self::set_conn($conn, $label);
|
self::set_conn($conn, $label);
|
||||||
|
$conn->connect($databaseConfig);
|
||||||
|
|
||||||
return $conn;
|
return $conn;
|
||||||
}
|
}
|
||||||
@ -416,7 +415,7 @@ class DB
|
|||||||
} elseif (is_int($next)) {
|
} elseif (is_int($next)) {
|
||||||
$value = $next;
|
$value = $next;
|
||||||
} else {
|
} else {
|
||||||
$value = DB::is_active() ? Convert::raw2sql($next, true) : $next;
|
$value = (DB::get_conn() !== null) ? Convert::raw2sql($next, true) : $next;
|
||||||
}
|
}
|
||||||
$joined .= $value;
|
$joined .= $value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user