From ded059cd124288aaff37c2d595104b49e8d213c9 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 23 Aug 2016 11:03:25 +0200 Subject: [PATCH] lib/php/db/field.php --- lib/php/db/field.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) { -- 2.47.3