From 3224372562ca79109ca9ade6f6403b44c4adf5be Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 11 Aug 2011 19:51:51 +0000 Subject: [PATCH] =?utf8?q?Fix=20Bug=20#30322=20=E2=80=9CSVG=20metadata=20i?= =?utf8?q?s=20read=20incorrectly=E2=80=9D=20by=20applying=20supplied=20pat?= =?utf8?q?ch?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- includes/media/SVGMetadataExtractor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1