Close the xmlreader when we are done with it.
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Feb 2011 15:42:02 +0000 (15:42 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Feb 2011 15:42:02 +0000 (15:42 +0000)
includes/media/SVGMetadataExtractor.php

index 3bdbc88..42c914e 100644 (file)
@@ -49,6 +49,9 @@ class SVGReader {
        function __construct( $source ) {
                $this->reader = new XMLReader();
                $this->reader->open( $source, null, LIBXML_NOERROR | LIBXML_NOWARNING );
+               #$this->reader->setParserProperty( XMLReader::DEFAULTATTRS, FALSE );
+               #$this->reader->setParserProperty( XMLReader::DEFAULTATTRS, FALSE );
+               #$this->reader->setParserProperty( XMLReader::VALIDATE , FALSE );
 
                $this->metadata['width'] = self::DEFAULT_WIDTH;
                $this->metadata['height'] = self::DEFAULT_HEIGHT;
@@ -113,6 +116,8 @@ class SVGReader {
                        }
                }
 
+               $this->reader->close();
+
                return true;
        }