*Check if a String and empty. This was '0' works as a title again.
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Nov 2007 03:45:59 +0000 (03:45 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Nov 2007 03:45:59 +0000 (03:45 +0000)
languages/Language.php

index 616b70f..9d54e15 100644 (file)
@@ -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]);