From f9869dbfedfb93742066ba53201d4453456eb58e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 Nov 2019 12:46:11 +0100 Subject: [PATCH] Fix price2num need langs when lang is not necessarly loaded. --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0d53fa0bf79..c6965fd384a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7080,13 +7080,13 @@ abstract class CommonObject if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field]=$conf->entity; else { - $queryarray[$field] = (int) price2num($this->{$field}); + $queryarray[$field] = (int) $this->{$field}; if (empty($queryarray[$field])) $queryarray[$field]=0; // May be reset to null later if property 'notnull' is -1 for this field. } } elseif($this->isFloat($info)) { - $queryarray[$field] = (double) price2num($this->{$field}); + $queryarray[$field] = (double) $this->{$field}; if (empty($queryarray[$field])) $queryarray[$field]=0; } else