Skip to content

Conversation

@marc-mabe
Copy link
Contributor

The default value of timestamp_end is INT32_MAX and not ZEND_LONG_MAX.

Additionally, changing the default to ZEND_LONG_MAX would result in an OOM error on calling the function without params.

Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

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

LGTM!

@derickr
Copy link
Member

derickr commented Mar 28, 2025

Isn't there a similar issue with the start time? Shouldn't that not be -2147483648 instead of PHP_INT_MIN ?

@marc-mabe
Copy link
Contributor Author

marc-mabe commented Mar 28, 2025

@derickr it's defined as zend_long timestamp_begin = ZEND_LONG_MIN, timestamp_end = INT32_MAX; - see https://github.com/php/php-src/blob/php-8.4.5/ext/date/php_date.c#L4317

Copy link
Member

@derickr derickr left a comment

Choose a reason for hiding this comment

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

Ah, you're right. LGTM, but it looks like you need to rebase first.

marc-mabe and others added 2 commits May 26, 2025 17:45
The default value of `timestamp_end` is INT32_MAX and not ZEND_LONG_MAX
@marc-mabe
Copy link
Contributor Author

Ah, you're right. LGTM, but it looks like you need to rebase first.

done

Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

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

CircleCI failure was my fault and got fixed by in #18666

@DanielEScherzer DanielEScherzer merged commit 3a14ce1 into php:master Jun 4, 2025
8 of 9 checks passed
@marc-mabe marc-mabe deleted the patch-1 branch June 4, 2025 06:43
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.

4 participants