From 5e0c62cd9a2b553b3d1d799d86651e267f82bfd5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 30 Jul 2010 11:49:37 -0600 Subject: [PATCH] sanity checking for Horde_Mime::is8bit() --- framework/Mime/lib/Horde/Mime.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime.php b/framework/Mime/lib/Horde/Mime.php index c52525696..f048af390 100644 --- a/framework/Mime/lib/Horde/Mime.php +++ b/framework/Mime/lib/Horde/Mime.php @@ -60,7 +60,7 @@ class Horde_Mime { /** * Attempt to work around non RFC 2231-compliant MUAs by generating both - * a RFC 2047-like parameter name and also the correct RFC 2231 + * a RFC 2047-like parameter name and also the correct RFC 2231 * parameter. See: * http://lists.horde.org/archives/dev/Week-of-Mon-20040426/014240.html * @@ -77,8 +77,12 @@ class Horde_Mime * * @return boolean True if string contains non US-ASCII characters. */ - static public function is8bit($string, $charset = 'us-ascii') + static public function is8bit($string, $charset = null) { + if (empty($charset)) { + $charset = 'us-ascii'; + } + /* ISO-2022-JP is a 7bit charset, but it is an 8bit representation so * it needs to be entirely encoded. */ return is_string($string) && -- 2.11.0