From 139419c3e85928e3b7ecc6775f10f7369b8216df Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Thu, 5 Dec 2019 10:38:03 +0100 Subject: [PATCH] FIX 10.0: do not display single-letter values (indicating duration unit without value) in product list (this fix exists in develop) --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index cfa330196d9..f3a190e329b 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -900,7 +900,7 @@ if ($resql) print $duration_value; print (! empty($duration_unit) && isset($dur[$duration_unit]) ? ' '.$langs->trans($dur[$duration_unit]) : ''); } - else + elseif (! preg_match('/^[a-z]$/i', $obj->duration)) // If duration is a simple char (like 's' of 'm'), we do not show value { print $obj->duration; }