For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/extensions/ImageMap/ImageMap_body.php =================================================================== --- trunk/extensions/ImageMap/ImageMap_body.php (revision 21992) +++ trunk/extensions/ImageMap/ImageMap_body.php (revision 21993) @@ -124,6 +124,8 @@ $alt = trim( $m[2] ); } elseif ( preg_match( '/^ \[\[ ([^\]]*+) \]\] \w* $ /x', $link, $m ) ) { $title = Title::newFromText( $m[1] ); + if (is_null($title)) + return self::error('imagemap_invalid_title', $lineNum); $alt = $title->getFullText(); } elseif ( $wgImageMapAllowExternalLinks && ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) ) ) { if ( preg_match( '/^ \[ ([^\s]*+) \s ([^\]]*+) \] \w* $ /x', $link, $m ) ) {