From: Mark A. Hershberger Date: Thu, 11 Aug 2011 19:51:51 +0000 (+0000) Subject: Fix Bug #30322 “SVG metadata is read incorrectly” by applying supplied patch X-Git-Tag: 1.31.0-rc.0~28347 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=3224372562ca79109ca9ade6f6403b44c4adf5be;p=lhc%2Fweb%2Fwiklou.git Fix Bug #30322 “SVG metadata is read incorrectly” by applying supplied patch --- diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 791c5105c3..22ef8e6186 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -55,7 +55,7 @@ class SVGReader { $size = filesize( $source ); if ( $size === false ) { throw new MWException( "Error getting filesize of SVG." ); - } + } if ( $size > $wgSVGMetadataCutoff ) { $this->debug( "SVG is $size bytes, which is bigger than $wgSVGMetadataCutoff. Truncating." ); @@ -157,7 +157,7 @@ class SVGReader { } $keepReading = $this->reader->read(); while( $keepReading ) { - if( $this->reader->localName == $name && $this->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) { + if( $this->reader->localName == $name && $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::END_ELEMENT ) { break; } elseif( $this->reader->nodeType == XmlReader::TEXT ){ $this->metadata[$metafield] = trim( $this->reader->value );