Avoid undefined string index notice on {{}}
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 28 Nov 2004 02:46:52 +0000 (02:46 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 28 Nov 2004 02:46:52 +0000 (02:46 +0000)
includes/Parser.php

index 433487a..9174af3 100644 (file)
@@ -1383,7 +1383,7 @@ class Parser
                $fname = 'Parser::maybeDoSubpageLink';
                wfProfileIn( $fname );
                # Look at the first character
-               if( $target{0} == '/' ) {
+               if( $target != '' && $target{0} == '/' ) {
                        # / at end means we don't want the slash to be shown
                        if(substr($target,-1,1)=='/') {
                                $target=substr($target,1,-1);