From 3a0bcfa58f36ee4b659e1c12132a9ab74ea5b804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 27 Jun 2023 11:14:06 +0200 Subject: [PATCH] fix tooltip in element project if $margin = 0 then $margin == 'add' is true do not compare int with string --- htdocs/projet/element.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index ba0ee7723fc..a5541ffb4da 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -733,12 +733,12 @@ foreach ($listofreferent as $key => $value) { } $name = $langs->trans($value['name']); $qualified = $value['test']; - $margin = empty($value['margin']) ? 0 : $value['margin']; + $margin = empty($value['margin']) ? '' : $value['margin']; if ($qualified && isset($margin)) { // If this element must be included into profit calculation ($margin is 'minus' or 'add') - if ($margin == 'add') { + if ($margin === 'add') { $tooltiponprofitplus .= ' > '.$name." (+)
\n"; } - if ($margin == 'minus') { + if ($margin === 'minus') { $tooltiponprofitminus .= ' > '.$name." (-)
\n"; } }