safe
safe copied to clipboard
Bug in date_sunrise and date_sunset in v1.3.3
Actually functions date_sunrise
and date_sunset
released in version v1.3.3
have a bug:
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $utcOffset = 0)
{
error_clear_last();
if ($utcOffset !== 0) {
The if condition if ($utcOffset !== 0) {
always fail becaouse 0. !== 0
.
Current version in master
branch doesn't have this issue.
Can you release a new version with updated code? Thanks
Hey @fox91, thanks for creating the issue. We're working on a PHP8 compatible release. We haven't yet had the time to figure out how to support multiple different PHP versions, as the functions are generated based on the latest PHP docs and thus are only compatible with the latest PHP version. This is something that we do want to look at, but I'm afraid I don't have a short-term solution for you at the moment.