From: Jan Schneider Date: Mon, 18 Oct 2010 10:59:44 +0000 (+0200) Subject: These require to pass a charset now. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b65bff42d9c03b9b96c05e394506a0f460239cef;p=horde.git These require to pass a charset now. --- diff --git a/framework/Util/lib/Horde/String.php b/framework/Util/lib/Horde/String.php index fa2986a95..5bdbd244f 100644 --- a/framework/Util/lib/Horde/String.php +++ b/framework/Util/lib/Horde/String.php @@ -260,6 +260,9 @@ class Horde_String static public function ucfirst($string, $locale = false, $charset = null) { if ($locale) { + if (is_null($charset)) { + throw new InvalidArgumentException('$charset argument must not be null'); + } $first = self::substr($string, 0, 1, $charset); if (self::isAlpha($first, $charset)) { $string = self::upper($first, true, $charset) . self::substr($string, 1, null, $charset); @@ -581,7 +584,7 @@ class Horde_String * * @return boolean True if the parameter was alphabetic only. */ - static public function isAlpha($string, $charset = null) + static public function isAlpha($string, $charset) { if (!Horde_Util::extensionExists('mbstring')) { return ctype_alpha($string); @@ -613,7 +616,7 @@ class Horde_String * * @return boolean True if the parameter was lowercase. */ - static public function isLower($string, $charset = null) + static public function isLower($string, $charset) { return ((self::lower($string, true, $charset) === $string) && self::isAlpha($string, $charset)); @@ -628,7 +631,7 @@ class Horde_String * * @return boolean True if the parameter was uppercase. */ - static public function isUpper($string, $charset = null) + static public function isUpper($string, $charset) { return ((self::upper($string, true, $charset) === $string) && self::isAlpha($string, $charset)); diff --git a/wicked/lib/Driver/sql.php b/wicked/lib/Driver/sql.php index ef06ecacc..093aed685 100644 --- a/wicked/lib/Driver/sql.php +++ b/wicked/lib/Driver/sql.php @@ -240,7 +240,7 @@ class Wicked_Driver_sql extends Wicked_Driver { function getLikePages($pagename) { - if (Horde_String::isUpper($pagename)) { + if (Horde_String::isUpper($pagename, 'UTF-8')) { $firstword = $pagename; $lastword = null; } else {