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;