From 9477ce3a5927295505b2b19ec8ffb2b19d0431b7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 16 Nov 2007 23:10:07 +0000 Subject: [PATCH] Instead of giving weird-ass results when an array is passed to Language::lcfirst(), only use our clever optimization if it is a string. Array will spit out annoying notices as before so you can tell what you did wrong. --- languages/Language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/Language.php b/languages/Language.php index fda406a8c9..0fda0db4d4 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1202,7 +1202,7 @@ class Language { function lcfirst( $str ) { if ( empty($str) ) return $str; - if ( ord($str[0]) < 128 ) { + if ( is_string( $str ) && ord($str[0]) < 128 ) { // editing string in place = cool $str[0]=strtolower($str[0]); return $str; -- 2.20.1