Skip to content

Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset - #16483

Closed
cmb69 wants to merge 3 commits into
php:PHP-8.2from
cmb69:cmb/gh16454
Closed

cmb69 wants to merge 3 commits into
php:PHP-8.2from
cmb69:cmb/gh16454

Conversation

@cmb69

@cmb69 cmb69 commented Oct 17, 2024

Copy link
Copy Markdown
Member

After normalization, N is supposed to be in range [0, 24], but for very large and very small $utcOffset this is not necessarily the case, since the normalization might yied -inf or inf. If that happens, we let the function fail silently, since it is highly unlikely that such $utcOffsets are passed in practice.

After normalization, `N` is supposed to be in range [0, 24], but for
very large and very small `$utcOffset` this is not necessarily the
case, since the normalization might yied `-inf` or `inf`.  If that
happens, we let the function fail silently, since it is highly unlikely
that such `$utcOffset`s are passed in practice.
@cmb69
cmb69 requested a review from derickr as a code owner October 17, 2024 15:10
@cmb69 cmb69 linked an issue Oct 17, 2024 that may be closed by this pull request

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, considering this function is on its way out, no point doing something more rigorous.

@derickr derickr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmb69 cmb69 closed this in 9bc3418 Oct 18, 2024
@cmb69
cmb69 deleted the cmb/gh16454 branch October 18, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhandled INF in date_sunset() with tiny $utcOffset

3 participants