From 3f17cedb1529f92b3405159b24925463dc70efdd Mon Sep 17 00:00:00 2001 From: yannis Date: Thu, 5 Sep 2024 10:49:39 +0200 Subject: [PATCH] FIX: holidays accounting at the end of taken month: fix php-stan and rework casting to int (2) --- htdocs/holiday/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 54ed2edc52807..50a3cbb6467ed 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -851,7 +851,7 @@ if (!empty($decrease)) { $lastUpdate = strtotime($object->getConfCP('lastUpdate', dol_print_date(dol_now(), '%Y%m%d%H%M%S'))); $date = strtotime('-1 month', $lastUpdate); - $endOfMonthBeforeLastUpdate = dol_mktime(0, 0, 0, date('m', $date), date('t', $date), date('Y', $date), 1); + $endOfMonthBeforeLastUpdate = dol_mktime(0, 0, 0, (int) date('m', $date), (int) date('t', $date), (int) date('Y', $date), 1); if ($object->date_debut_gmt < $endOfMonthBeforeLastUpdate && $object->date_fin_gmt > $endOfMonthBeforeLastUpdate) { $endDate = $endOfMonthBeforeLastUpdate; } elseif ($object->date_debut_gmt > $endOfMonthBeforeLastUpdate) {