1
0
mirror of https://github.com/dg/dibi.git synced 2025-07-31 19:30:30 +02:00
This commit is contained in:
David Grudl
2022-10-13 03:52:05 +02:00
parent 96e370b8fe
commit 3a962de553
4 changed files with 7 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ function test(string $title, Closure $function): void
/** Replaces [] with driver-specific quotes */
function reformat($s)
{
global $config;
$config = $GLOBALS['config'];
if (is_array($s)) {
if (isset($s[$config['system']])) {
return $s[$config['system']];
@@ -72,7 +72,7 @@ function reformat($s)
function num($n)
{
global $config;
$config = $GLOBALS['config'];
if (substr($config['dsn'] ?? '', 0, 5) === 'odbc:') {
$n = is_float($n) ? "$n.0" : (string) $n;
}