1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-16 19:14:17 +02:00

strict type fixes

This commit is contained in:
David Grudl
2017-06-09 22:58:05 +02:00
parent f9997f9b52
commit 957d9281f3
5 changed files with 9 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ function reformat($s)
function num($n)
{
global $config;
if (substr(@$config['dsn'], 0, 5) === 'odbc:' || $config['driver'] === 'sqlite') {
if (substr($config['dsn'] ?? '', 0, 5) === 'odbc:' || $config['driver'] === 'sqlite') {
$n = is_float($n) ? "$n.0" : (string) $n;
}
return $n;