Fix for unexpected zero value last edit dates in segment archiving by bx80 · Pull Request #21190 · matomo-org/matomo · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for unexpected zero value last edit dates in segment archiving #21190

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

bx80
Copy link
Contributor

@bx80 bx80 commented Aug 28, 2023

Description:

If a segment has a last edited date of 0000-00-00 then segment archiving will fail with the exception: The date xxx is a date before first website was online.

This is caused by attempting to parse the invalid 0000-00-00 date string. This PR adds a simple check to avoid parsing if the last edited date is null or zero along with some additional tests to check an exception isn't thrown when zero dates are provided.

This is a 4.x back port of #21189

ref: L3-522

Review

@bx80 bx80 added the Bug For errors / faults / flaws / inconsistencies etc. label Aug 28, 2023
@bx80 bx80 added this to the 4.15.2 milestone Aug 28, 2023
@bx80 bx80 self-assigned this Aug 28, 2023
@bx80 bx80 changed the title Fix for unexpected zero value last edit dates in segment archiving Fix for unexpected zero value last edit dates in segment archiving 4.x Aug 28, 2023
@bx80 bx80 added the Needs Review PRs that need a code review label Aug 28, 2023
@sgiehl sgiehl merged commit d8d6cbb into 4.x-dev Aug 30, 2023
17 of 21 checks passed
@sgiehl sgiehl deleted the l3-522-segment-archiving-date-fix-4 branch August 30, 2023 15:28
@sgiehl sgiehl changed the title Fix for unexpected zero value last edit dates in segment archiving 4.x Fix for unexpected zero value last edit dates in segment archiving Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants