Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1234,7 +1234,9 @@ |
1235 | 1235 | # Media link; trail not supported. |
1236 | 1236 | $linkRegexp = '/\[\[(.*?)\]\]/'; |
1237 | 1237 | $title = Title::makeTitleSafe( NS_FILE, $submatch[1] ); |
1238 | | - $thelink = self::makeMediaLinkObj( $title, $text ); |
| 1238 | + if ( $title ) { |
| 1239 | + $thelink = self::makeMediaLinkObj( $title, $text ); |
| 1240 | + } |
1239 | 1241 | } else { |
1240 | 1242 | # Other kind of link |
1241 | 1243 | if ( preg_match( $wgContLang->linkTrail(), $match[4], $submatch ) ) { |