Use strpos() instead of preg_match() when checking for "/" in Skin::subPageSubtitle
authorGlaisher <glaisher.wiki@gmail.com>
Mon, 13 Jun 2016 12:15:01 +0000 (17:15 +0500)
committerGlaisher <glaisher.wiki@gmail.com>
Mon, 13 Jun 2016 12:20:14 +0000 (17:20 +0500)
Per http://php.net/manual/en/function.preg-match.php#refsect1-function.preg-match-notes

Change-Id: I0b2a0e89d77422ed50e5178fcdbbb4e31199fdc8

includes/skins/Skin.php

index d70a6b9..fce68bb 100644 (file)
@@ -661,7 +661,7 @@ abstract class Skin extends ContextSource {
 
                if ( $out->isArticle() && MWNamespace::hasSubpages( $out->getTitle()->getNamespace() ) ) {
                        $ptext = $this->getTitle()->getPrefixedText();
-                       if ( preg_match( '/\//', $ptext ) ) {
+                       if ( strpos( $ptext, '/' ) !== false ) {
                                $links = explode( '/', $ptext );
                                array_pop( $links );
                                $c = 0;