From f5d064175f87b9736a1ee4735768ce8e9597c6e1 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Fri, 19 Jan 2024 20:06:03 +0100 Subject: [PATCH] qual: phsptan htdocs/projet/stats/index.php 86 Property Stats::$year (int) does not accept array|string. htdocs/projet/stats/index.php 204 Property Stats::$year (int) does not accept array|string. --- htdocs/projet/stats/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index eeb33ccf2ed..25af61c3a7f 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -42,7 +42,7 @@ if ($user->socid > 0) { $socid = $user->socid; } $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); -$year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear; +$year = GETPOSTINT('year') > 0 ? GETPOSTINT('year') : $nowyear; $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); $endyear = $year;