From: Glaisher Date: Mon, 13 Jun 2016 12:15:01 +0000 (+0500) Subject: Use strpos() instead of preg_match() when checking for "/" in Skin::subPageSubtitle X-Git-Tag: 1.31.0-rc.0~6636^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=38a6d3e9a4ea8758312946be77d5e419d893f19b;p=lhc%2Fweb%2Fwiklou.git Use strpos() instead of preg_match() when checking for "/" in Skin::subPageSubtitle Per http://php.net/manual/en/function.preg-match.php#refsect1-function.preg-match-notes Change-Id: I0b2a0e89d77422ed50e5178fcdbbb4e31199fdc8 --- diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index d70a6b91da..fce68bba4e 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -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;