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.
This commit is contained in:
parent
f6c8f40f96
commit
9477ce3a59
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue