From: Derk-Jan Hartman Date: Sat, 19 Feb 2011 15:42:02 +0000 (+0000) Subject: Close the xmlreader when we are done with it. X-Git-Tag: 1.31.0-rc.0~31894 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=18235437a863c39d314ab939acad25aa7b720c0a;p=lhc%2Fweb%2Fwiklou.git Close the xmlreader when we are done with it. --- diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 3bdbc88857..42c914e9ae 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -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; }