From: Nicolas Boisselier Date: Tue, 23 Aug 2016 09:03:25 +0000 (+0200) Subject: lib/php/db/field.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ded059cd124288aaff37c2d595104b49e8d213c9;p=nb.git lib/php/db/field.php --- diff --git a/lib/php/db/field.php b/lib/php/db/field.php index 8baf459f..2997dae4 100644 --- a/lib/php/db/field.php +++ b/lib/php/db/field.php @@ -1,4 +1,5 @@ PDO::PARAM_BOOL, @@ -222,7 +223,10 @@ class field extends nb { public function out($value,$html_escape=false) { #if ($value === null) return ''; - static $sqlite = null; if ($sqlite === null) $sqlite = $this->db()->type == 'sqlite'; + static $sqlite = null; if ($sqlite === null) { + $db = $this->db(); + $sqlite = $db::$type == 'sqlite'; + } # Anoying, sqlite does not format properly ! if ($sqlite and preg_match('/^float\((?:\d+,)?(\d+)\)/',$this->type,$m)) {