Skip to content
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
merged 1 commit into from
Dec 1, 2013
Merged

Convert properties to string in OOCalc reader #276

merged 1 commit into from
Dec 1, 2013

Conversation

infojunkie
Copy link
Contributor

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.

MarkBaker pushed a commit that referenced this pull request Dec 1, 2013
Convert properties to string in OOCalc reader
@MarkBaker MarkBaker merged commit 9f93cab into PHPOffice:develop Dec 1, 2013
MarkBaker pushed a commit that referenced this pull request Dec 1, 2013
@MarkBaker
Copy link
Member

Thanks

@Progi1984 Progi1984 modified the milestone: 1.8.0 Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants