jenkins-bot has submitted this change and it was merged.

Change subject: Get strpos() parameters correct
......................................................................


Get strpos() parameters correct

Change-Id: I38cba9d9b6a95039f71f6bf02df9e6d2b3c6ecc5
---
M wmf-config/CommonSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fcb14f7..cbfe59a 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -242,7 +242,8 @@
 // from site outage. -- Chad, 2015-10-14
 $wgHooks['RejectParserCacheValue'][] = function( ParserOutput $parserOutput, 
$page, ParserOptions $popts ) {
        $text = trim( $parserOutput->getText() );
-       if ( strpos( "<!-- \nNewPP limit report", $text ) === 0 ) {
+       $pos = strpos( $text, 'NewPP' );
+       if ( $pos !== false && $pos < 50 ) {
                $title = $page->getTitle();
                LoggerFactory::getInstance( 'T115505' )->info(
                        'Purging empty content page: ' . 
$title->getPrefixedDBkey()

-- 
To view, visit https://gerrit.wikimedia.org/r/246296
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I38cba9d9b6a95039f71f6bf02df9e6d2b3c6ecc5
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to