Merge "collation: Remove suppressWarnings() for getSortKey()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 May 2016 17:33:13 +0000 (17:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 May 2016 17:33:13 +0000 (17:33 +0000)
includes/collation/IcuCollation.php

index a374b13..f6a9dc7 100644 (file)
@@ -188,20 +188,11 @@ class IcuCollation extends Collation {
        }
 
        public function getSortKey( $string ) {
-               // intl extension produces non null-terminated
-               // strings. Appending '' fixes it so that it doesn't generate
-               // a warning on each access in debug php.
-               MediaWiki\suppressWarnings();
-               $key = $this->mainCollator->getSortKey( $string ) . '';
-               MediaWiki\restoreWarnings();
-               return $key;
+               return $this->mainCollator->getSortKey( $string );
        }
 
        public function getPrimarySortKey( $string ) {
-               MediaWiki\suppressWarnings();
-               $key = $this->primaryCollator->getSortKey( $string ) . '';
-               MediaWiki\restoreWarnings();
-               return $key;
+               return $this->primaryCollator->getSortKey( $string );
        }
 
        public function getFirstLetter( $string ) {