Index: trunk/extensions/ShortUrl/ShortUrl.hooks.php |
— | — | @@ -22,8 +22,8 @@ |
23 | 23 | */ |
24 | 24 | public static function AddToolboxLink( &$tpl ) { |
25 | 25 | global $wgOut, $wgShortUrlPrefix; |
26 | | - if ( ! $wgOut->getTitle()->equals( Title::newMainPage() ) ) { |
27 | | - $title = $wgOut->getTitle(); |
| 26 | + $title = $wgOut->getTitle(); |
| 27 | + if ( $title->exists() && ! $title->equals( Title::newMainPage() ) ) { |
28 | 28 | $shortId = shorturlEncode( $title ); |
29 | 29 | $shortURL = $wgShortUrlPrefix . $shortId; |
30 | 30 | $html = Html::rawElement( 'li', array( 'id' => 't-shorturl' ), |