From c91ab621b848180c0954043eb0d63e0c8081dfd2 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 21 Jan 2020 17:49:27 +0100 Subject: [PATCH] FIX length, width and height coherence in product table --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 47b190ed4f7..aa6dd5e08a8 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -819,9 +819,9 @@ class Product extends CommonObject $this->height = price2num($this->height); $this->height_units = trim($this->height_units); // set unit not defined - if ($this->length_units) { $this->width_units = $this->length_units; // Not used yet + if (is_numeric($this->length_units)) { $this->width_units = $this->length_units; // Not used yet } - if ($this->length_units) { $this->height_units = $this->length_units; // Not used yet + if (is_numeric($this->length_units)) { $this->height_units = $this->length_units; // Not used yet } // Automated compute surface and volume if not filled if (empty($this->surface) && !empty($this->length) && !empty($this->width) && $this->length_units == $this->width_units) {