fixed bug where migrate db tried to create a new instance of an object w...#43
Open
mnelson4 wants to merge 1 commit intodeliciousbrains:masterfrom
Open
fixed bug where migrate db tried to create a new instance of an object w...#43mnelson4 wants to merge 1 commit intodeliciousbrains:masterfrom
mnelson4 wants to merge 1 commit intodeliciousbrains:masterfrom
Conversation
…t which MIGHT have a PRIVATE CONSTRUCTOR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...hich MIGHT have a PRIVATE CONSTRUCTOR.
I'm submitting this pull request because when we used wp-migrate-db with Event Espresso 4 (eventespresso.com), it gave us a fatal error because we're serializing objects to the database (specifically, as transients) which have a PRIVATE CONSTRUCTOR, because we're using them as singletons. (Eg, we have a class called EE_Cart, whose constructor is private, and on which you instead use a static function called instance() to get an instance of the object (and that function can call EE_Cart's constructor if it chooses)).
Was there some special reason why you needed to create a separate object and modify it, instead of just modifying the object you unserialized?
Anyways, with this change, I was succesfully able to run migrate-db with Event Espresso 4's data. Please let us know your thoughts on this.