From dde51a23f0768e325349a09c6d0c26897a039950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 16 Mar 2021 22:01:59 +0100 Subject: [PATCH] fix php8 warning sometimes $size == '' and cause warnings later in the code --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 61f81416f29..1ff47bd2de3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3391,7 +3391,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF { global $conf; - if ($size == 0 || !empty($conf->global->MAIN_DISABLE_TRUNC)) { + if (empty($size) || !empty($conf->global->MAIN_DISABLE_TRUNC)) { return $string; }