Change Title::getInterwiki() in conditions to Title::isExternal()
[lhc/web/wiklou.git] / includes / parser / ParserOutput.php
index 76d14cf..8cd978b 100644 (file)
@@ -279,10 +279,10 @@ class ParserOutput extends CacheTime {
         * @throws MWException if given invalid input
         */
        function addInterwikiLink( $title ) {
-               $prefix = $title->getInterwiki();
-               if ( $prefix == '' ) {
+               if ( !$title->isExternal() ) {
                        throw new MWException( 'Non-interwiki link passed, internal parser error.' );
                }
+               $prefix = $title->getInterwiki();
                if ( !isset( $this->mInterwikiLinks[$prefix] ) ) {
                        $this->mInterwikiLinks[$prefix] = array();
                }