Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344618 )

Change subject: Check for string initialization in lcfirst() for HHVM 3.18
......................................................................

Check for string initialization in lcfirst() for HHVM 3.18

HHVM 3.18 emits a notice when attempting to access the first offset of
an empty string.  We had that fixed for ucfirst() in 3605066c96. This is
the same for lcfirst().

Bug: T161095
Change-Id: I1456611222c24290f259298e883ca89dd830c74b
---
M languages/classes/LanguageKk.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/344618/1

diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php
index 0460a6c..3a50987 100644
--- a/languages/classes/LanguageKk.php
+++ b/languages/classes/LanguageKk.php
@@ -408,7 +408,7 @@
         * @return string
         */
        function lcfirst( $string ) {
-               if ( $string[0] == 'I' ) {
+               if ( substr( $string, 0, 1 ) === 'I' ) {
                        $variant = $this->getPreferredVariant();
                        if ( $variant == 'kk-latn' || $variant == 'kk-tr' ) {
                                return 'ı' . substr( $string, 1 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1456611222c24290f259298e883ca89dd830c74b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.17
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to