Fix SVG metadata handler by changing offset from -1 to 0
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 11 Jan 2019 00:08:07 +0000 (00:08 +0000)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 11 Jan 2019 00:08:07 +0000 (00:08 +0000)
commit459d31c9c8ed40314cf4115e4ea9ea68b7fc76a5
tree9a236eca3ed6ae75d6975e2231dd1dae96a45fd5
parentcb9de88ded69987e1b92161527896c0617bd7480
Fix SVG metadata handler by changing offset from -1 to 0

Starting in php 7.1, negative offsets are supported in
file_get_contents. Previously they were not (and in fact, the
php docs said -1 was the default value for the offset if unspecified).

The result of this, is starting in php 7.1, MediaWiki could not determine
the aspect ratio of SVG files that were larger than 256kb.

Follows up e6de99be

Bug: T213501
Change-Id: I565e51cd8131542b9a70da49e9cc36c5594ecda3
includes/media/SVGMetadataExtractor.php