XW-2307 | fixed whitespaces, using getMediaType method

This commit is contained in:
Weronika Rudnicka 2016-11-21 23:15:51 +01:00
parent 33210522f2
commit 8d055fb35c

View file

@ -58,7 +58,7 @@ class PortableInfoboxRenderServiceHelper {
$title = $data[ 'name' ];
$file = \WikiaFileHelper::getFileFromTitle( $title );
if ( !$file || !$file->exists() || !in_array($file->media_type, array(MEDIATYPE_BITMAP, MEDIATYPE_DRAWING))) {
if ( !$file || !$file->exists() || !in_array( $file->getMediaType(), [ MEDIATYPE_BITMAP, MEDIATYPE_DRAWING ] ) ) {
return false;
}