From 0bdfbdd4aef24da5b0c2f5fc467243d83e677f6d Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 16:14:37 +0100 Subject: [PATCH] Fix PhanPluginSuspiciousParamPosition by adding intermediate variable # Fix PhanPluginSuspiciousParamPosition by adding intermediate variable Add an intermediate variable to mediate the PhanPluginSuspiciousParamPosition notification which also clarifies the meaning of the value where the function is called. --- htdocs/societe/notify/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index ee49f1ceb48..0eec74a8151 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -240,7 +241,7 @@ if ($result > 0) { $resql = $db->query($sql); if ($resql) { - $num = $db->num_rows($resql); + $totalnboflines = $db->num_rows($resql); } else { dol_print_error($db); } @@ -252,7 +253,8 @@ if ($result > 0) { // Add notification form //print load_fiche_titre($titlelist.' ('.$num.')', '', ''); - print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1); + $num = $totalnboflines; + print_barre_liste($titlelist, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1); print '
'; print '';