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

MemoryDrawing bug fix for Issue #92 #106

Merged
merged 4 commits into from
Mar 6, 2017
Merged

MemoryDrawing bug fix for Issue #92 #106

merged 4 commits into from
Mar 6, 2017

Conversation

ankitm123
Copy link
Contributor

@ankitm123 ankitm123 commented Mar 2, 2017

Fix for Cloned worksheet updates reflected on original (Drawing) #92
We need to make note of two things:

  • The old code was trying to clone an objectArray, and hence was performing a shallow copy of memoryDrawing objects (the __clone magic function was not getting invoked).
    Instead, if one loops over the objectArray, and then clones the individual memory drawing objects, then the __clone function for the MemoryDrawing object is invoked.

  • The __clone function for memory drawing was using the clone keyword which does not deal with circular references (Since memoryDrawing object had references to worksheet object, it was encountering an infinite loop). However, serializing and unserializing objects deals with circular references pretty well.

@PowerKiKi PowerKiKi merged commit f99eb8d into PHPOffice:develop Mar 6, 2017
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