r82461 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82460‎ | r82461 | r82462 >
Date:15:42, 19 February 2011
Author:hartman
Status:ok (Comments)
Tags:
Comment:
Close the xmlreader when we are done with it.
Modified paths:
  • /trunk/phase3/includes/media/SVGMetadataExtractor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/SVGMetadataExtractor.php
@@ -49,6 +49,9 @@
5050 function __construct( $source ) {
5151 $this->reader = new XMLReader();
5252 $this->reader->open( $source, null, LIBXML_NOERROR | LIBXML_NOWARNING );
 53+ #$this->reader->setParserProperty( XMLReader::DEFAULTATTRS, FALSE );
 54+ #$this->reader->setParserProperty( XMLReader::DEFAULTATTRS, FALSE );
 55+ #$this->reader->setParserProperty( XMLReader::VALIDATE , FALSE );
5356
5457 $this->metadata['width'] = self::DEFAULT_WIDTH;
5558 $this->metadata['height'] = self::DEFAULT_HEIGHT;
@@ -113,6 +116,8 @@
114117 }
115118 }
116119
 120+ $this->reader->close();
 121+
117122 return true;
118123 }
119124

Follow-up revisions

RevisionCommit summaryAuthorDate
r82911Remove unneeded commented code, that I accidently added in r82461hartman21:06, 27 February 2011
r82912Partial merge r82461, close() the reader when we're done with it....demon21:06, 27 February 2011

Comments

#Comment by Nikerabbit (talk | contribs)   17:02, 19 February 2011

What's up with the commented code?

Status & tagging log