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

Ecommerce Tracker may fail with "Integrity constraint violation: 1062 Duplicate entry" #8599

Merged
merged 1 commit into from Aug 20, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 19, 2015

refs #8597

I'm not sure how to reproduce this issue but this would suppress the exception as discussed in the issue.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Aug 19, 2015
@tsteur tsteur added this to the 2.15.0 milestone Aug 19, 2015
$this->getDb()->query($sql, $bind);
} catch (Exception $e) {
if ($e->getCode() == 23000 ||
false !== strpos($e->getMessage(), 'Duplicate entry') ||
Copy link
Member Author

Choose a reason for hiding this comment

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

Just to be sure in case mysql engines/adapters return a different code... it's more likely we catch it

@tsteur tsteur added Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. and removed Needs Review PRs that need a code review labels Aug 19, 2015
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Aug 19, 2015
mattab pushed a commit that referenced this pull request Aug 20, 2015
Ecommerce Tracker may fail with "Integrity constraint violation: 1062 Duplicate entry"
@mattab mattab merged commit db4f57c into master Aug 20, 2015
@mattab
Copy link
Member

mattab commented Aug 20, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants