Skip to content

when adding image to relationship first check that the generated RID is actually unique #2063

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

Merged
merged 3 commits into from
May 29, 2021

Conversation

tpv-ebben
Copy link
Contributor

Description

Occasionally we would have a document fail to add the images and upon further research I discovered the RID generate for the image duplicated an existing RID which caused the images to not appear in the document and some version of Word to complain the document is corrupt. The fix takes the current generation method and checks for if it already exists and simple increments the number until it finds one that doesn't exist.

Fixes # (issue)
potentially 1964 and 1947 and others

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

@troosan troosan changed the title when adding image to relationship list check that the generated RID is actually unique when adding image to relationship first check that the generated RID is actually unique Apr 16, 2021
@troosan troosan added this to the v0.18.2 milestone Apr 16, 2021
@troosan troosan merged commit d905e76 into PHPOffice:develop May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants