Skip to content

Fix GH-7979: DatePeriod iterator advances when checking if valid - #8175

Closed
Nacoma wants to merge 2 commits into
php:PHP-8.0from
Nacoma:gh-7979
Closed

Nacoma wants to merge 2 commits into
php:PHP-8.0from
Nacoma:gh-7979

Conversation

@Nacoma

@Nacoma Nacoma commented Mar 6, 2022

Copy link
Copy Markdown
Contributor

Fixes #7979

@Nacoma Nacoma changed the title GH-7979: iterator advances when checking if valid Fix GH-7979: iterator advances when checking if valid Mar 6, 2022
@Nacoma Nacoma changed the title Fix GH-7979: iterator advances when checking if valid Fix GH-7979: DatePeriod iterator advances when checking if valid Mar 6, 2022

@cmb69 cmb69 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.

Thank you for the PR! From a quick look, this fix looks reasonable.

@derickr, you may want to review.

Comment thread ext/date/php_date.c Resolved
Comment thread ext/date/php_date.c Resolved
@cmb69 cmb69 linked an issue Mar 30, 2022 that may be closed by this pull request
@derickr derickr self-assigned this Apr 14, 2022
derickr added a commit that referenced this pull request Apr 14, 2022
@derickr

derickr commented Apr 14, 2022

Copy link
Copy Markdown
Member

I've merged this after a little refactor to avoid duplicated code. Thanks for your patch!

@derickr derickr closed this Apr 14, 2022
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.

DatePeriod::getIterator()->valid() advances DatePeriod iterator

3 participants