Skip to content

Commit

Permalink
fix implicit float to int conversion
Browse files Browse the repository at this point in the history
On PHP 8.1, the following deprecation warning is shown:
Deprecated: Implicit conversion from float 505.5 to int loses precision in /app/vendor/fgits/carbon-german-holidays/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php on line 143
  • Loading branch information
Mau04 authored Sep 18, 2022
1 parent a7c990e commit ec2231c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static function getHolidays($year, $states = self::ALL_STATES)
$states = array($states);
}

$penanceDay = mktime(0, 0, 0, 11, 22 - ($year - 1 + $year / 4) % 7, $year);
$penanceDay = mktime(0, 0, 0, 11, 22 - ($year - 1 + ((int) ((int) ($year / 4)) % 7)), $year);


// For all states
Expand Down

0 comments on commit ec2231c

Please sign in to comment.