From 9a9349944b03db46f630f1979e0ff5e84de8fea1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 13 Nov 2007 15:07:54 +0000 Subject: [PATCH] It's no problem to use empty(), as long as you return $str rather than an empty string. --- languages/Language.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages/Language.php b/languages/Language.php index b5303ed893..9a3e79815a 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -931,7 +931,7 @@ class Language { } function ucfirst( $str ) { - if ( $str === '' ) return ""; + if ( empty($str) ) return $str; 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 } @@ -963,7 +963,7 @@ class Language { } function lcfirst( $str ) { - if ( $str === '' ) return ""; + if ( empty($str) ) return $str; if ( ord($str[0]) < 128 ) { // editing string in place = cool $str[0]=strtolower($str[0]); -- 2.20.1