tweak
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 20 Nov 2008 23:19:57 +0000 (16:19 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 20 Nov 2008 23:19:57 +0000 (16:19 -0700)
framework/Mime/lib/Horde/Mime/Headers.php

index b8df2c8..dabe879 100644 (file)
@@ -474,12 +474,12 @@ class Horde_Mime_Headers
         $line = '';
         $eollength = strlen($eol);
         $length = 1000 - $eollength;
-        $paramcount = count($params);
+        $paramcount = count($params) - 1;
 
         reset($params);
         while (list($count, $val) = each($params)) {
             /* If longer than RFC allows, then simply chop off the excess. */
-            $moreparams = (($count + 1) != $paramcount);
+            $moreparams = ($count != $paramcount);
             $maxlength = $length - (!empty($line) ? 1 : 0) - (($moreparams) ? 1 : 0);
             if (strlen($val) > $maxlength) {
                 $val = substr($val, 0, $maxlength);