Skip to content

Commit

Permalink
FIX: holidays accounting at the end of taken month: fix php-stan and …
Browse files Browse the repository at this point in the history
…rework casting to int (2)
  • Loading branch information
YannisHoareau committed Sep 5, 2024
1 parent a504184 commit 3f17ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/holiday/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3f17ced

Please sign in to comment.