From 34a541d7deb3064a34e1edd6bc2bdb7cff6cf529 Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 23 Mar 2024 01:11:32 +0100 Subject: [PATCH] Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate --- htdocs/adherents/stats/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 0672b5f90c0..17488f72508 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * 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 @@ -49,7 +50,7 @@ if ($user->socid > 0) { } $result = restrictedArea($user, 'adherent', '', '', 'cotisation'); -$year = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); +$year = (int) dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $startyear = $year - (!getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); $endyear = $year; if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) {