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

Change subject: Fix StringNormalizer on HHVM
......................................................................


Fix StringNormalizer on HHVM

No idea why this is needed, but should be harmless
otherwise.

This is needed for hhvm 3.3.1+dfsg1-1+wm3.1,
hhvm 3.6.1 has no problems.

Change-Id: I23c51de5f90abf42be154b6a1b96d336c643a1b0
---
M lib/includes/StringNormalizer.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/includes/StringNormalizer.php 
b/lib/includes/StringNormalizer.php
index fdbf43a..5bead8c 100644
--- a/lib/includes/StringNormalizer.php
+++ b/lib/includes/StringNormalizer.php
@@ -90,7 +90,7 @@
                // \p{Z} - whitespace
                // \p{Cc} - control chars
                // WARNING: *any* invalid UTF8 sequence causes preg_replace to 
return an empty string.
-               $trimmed = preg_replace( '/^[\p{Z}\p{Cc}]+|[\p{Z}\p{Cc}]+$/u', 
'', $inputString );
+               $trimmed = preg_replace( 
'/^(\p{Z}|\p{Cc})+|(\p{Z}|\p{Cc})+$/u', '', $inputString );
                $trimmed = preg_replace( '/[\p{Cc}]+/u', ' ', $trimmed );
                return $trimmed;
        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23c51de5f90abf42be154b6a1b96d336c643a1b0
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to