diff --git a/ImageMap_body.php b/ImageMap_body.php index 225341f..b65bb02 100644 --- a/ImageMap_body.php +++ b/ImageMap_body.php @@ -79,7 +79,7 @@ class ImageMap { list( $image, $options ) = $bits; } $imageTitle = Title::newFromText( $image ); - if ( !$imageTitle || $imageTitle->getNamespace() != NS_IMAGE ) { + if ( !$imageTitle || !$imageTitle->inNamespace( NS_FILE ) ) { return self::error( 'imagemap_no_image' ); } if ( wfIsBadImage( $imageTitle->getDBkey(), $parser->mTitle ) ) {