This repository has been archived by the owner on Jan 2, 2019. It is now read-only.
Convert properties to string in OOCalc reader #276
Merged
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.
In the OOCalc reader, some properties that are read from meta.xml are copied to the DocumentProperties object as SimpleXMLElement instances, not as strings. This causes problems when e.g. serializing the worksheet object using PHP's
serialize()
function. The Excel2003XML does not seem to suffer from this, as all properties are converted to string or other simple data type before being copied.The patch here resolves this by explicitly casting the property values to string before copying them.
Here's a test ods file where the creator and lastModifiedby properties end up as SimpleXMLElement instances instead of strings, unless my patch is applied.