Merge "Propagate the favicon information to getInfo() for local repos"
[lhc/web/wiklou.git] / includes / parser / LinkHolderArray.php
index b629776..0e7c76f 100644 (file)
@@ -160,8 +160,8 @@ class LinkHolderArray {
                $pos = 0;
                while ( $pos < strlen( $text ) ) {
                        if ( !preg_match( '/<!--LINK (\d+):(\d+)-->/',
-                               $text, $m, PREG_OFFSET_CAPTURE, $pos ) )
-                       {
+                               $text, $m, PREG_OFFSET_CAPTURE, $pos )
+                       {
                                break;
                        }
                        $ns = $m[1][0];
@@ -501,7 +501,7 @@ class LinkHolderArray {
                                // Self-link checking for mixed/different variant titles. At this point, we
                                // already know the exact title does not exist, so the link cannot be to a
                                // variant of the current title that exists as a separate page.
-                               if ( $variantTitle->equals( $parentTitle ) && $title->getFragment() === '' ) {
+                               if ( $variantTitle->equals( $parentTitle ) && !$title->hasFragment() ) {
                                        $this->internals[$ns][$index]['selflink'] = true;
                                        continue 2;
                                }