Handle old libxml when extracting SVG metadata
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 28 May 2011 09:58:43 +0000 (09:58 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 28 May 2011 09:58:43 +0000 (09:58 +0000)
commit827254b99f33ecd61763181ddea77bdc76c72fe1
tree963c48011e7890cb0b37d0e0a5feb89bb93cec2b
parent716d85ad7e60f0d164c65e1f8423b1227d6012b7
Handle old libxml when extracting SVG metadata

Mac OS X 10.5.8 comes with libxml 2.6.16, thus some methods of XMLReader
are not availabe (ex: readInnerXML()).
This patch, throw an error if the above method does not exist (only one
use in our code).

Since metadata can comes as string or an XML fragment, I have split the tests
to take care of the two usages and of the exception.
includes/media/SVGMetadataExtractor.php
tests/phpunit/includes/media/SVGMetadataExtractorTest.php