tq: fix debugger for array

pull/395/head
Varun Patil 2023-02-05 12:39:46 -08:00
parent 0f5162bd68
commit 7f21e8802d
1 changed files with 10 additions and 1 deletions

View File

@ -40,7 +40,16 @@ class TimelineQuery
{
$params = $query->getParameters();
foreach ($params as $key => $value) {
$sql = str_replace(':'.$key, $query->getConnection()->getDatabasePlatform()->quoteStringLiteral($value), $sql);
if (\is_array($value)) {
$value = implode(',', $value);
} elseif (\is_bool($value)) {
$value = $value ? '1' : '0';
} elseif (null === $value) {
$value = 'NULL';
}
$value = $query->getConnection()->getDatabasePlatform()->quoteStringLiteral($value);
$sql = str_replace(':'.$key, $value, $sql);
}
return $sql;