From: Aaron Schulz Date: Tue, 13 Nov 2007 03:45:59 +0000 (+0000) Subject: *Check if a String and empty. This was '0' works as a title again. X-Git-Tag: 1.31.0-rc.0~50893 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=2a90dc7160068b735595d9611b0f8399b5dd414a;p=lhc%2Fweb%2Fwiklou.git *Check if a String and empty. This was '0' works as a title again. --- diff --git a/languages/Language.php b/languages/Language.php index 616b70f553..9d54e1519d 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -835,7 +835,7 @@ class Language { } function ucfirst( $str ) { - if (empty($str)) return ""; + if ( $str === '' ) return ""; if ( ord($str[0]) < 128 ) return ucfirst($str); else return self::uc($str,true); // fall back to more complex logic in case of multibyte strings } @@ -867,7 +867,7 @@ class Language { } function lcfirst( $str ) { - if (empty($str)) return ""; + if ( $str === '' ) return ""; if ( ord($str[0]) < 128 ) { // editing string in place = cool $str[0]=strtolower($str[0]);