X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FSVGMetadataExtractor.php;h=f8b0c3c9c070a275fca640234f2d99a205651df6;hb=04179d3a5ce90f3f967d0e004fdf68bd45b04541;hp=e52bf0b26a1c7fad1e2a899d8d005eba454b824a;hpb=5e2d030675f6ffaf3391e0483d10d6c4477a9231;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index e52bf0b26a..f8b0c3c9c0 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -74,7 +74,7 @@ class SVGReader { if ( $size > $wgSVGMetadataCutoff ) { $this->debug( "SVG is $size bytes, which is bigger than $wgSVGMetadataCutoff. Truncating." ); - $contents = file_get_contents( $source, false, null, -1, $wgSVGMetadataCutoff ); + $contents = file_get_contents( $source, false, null, 0, $wgSVGMetadataCutoff ); if ( $contents === false ) { throw new MWException( 'Error reading SVG file.' ); } @@ -165,7 +165,7 @@ class SVGReader { } elseif ( $isSVG && $tag == 'desc' ) { $this->readField( $tag, 'description' ); } elseif ( $isSVG && $tag == 'metadata' && $type == XMLReader::ELEMENT ) { - $this->readXml( $tag, 'metadata' ); + $this->readXml( 'metadata' ); } elseif ( $isSVG && $tag == 'script' ) { // We normally do not allow scripted svgs. // However its possible to configure MW to let them