Check and make sure the header property value is actually set to something before...
[squirrelmail.git] / class / mime / Rfc822Header.class.php
index 5ff139e..40b9391 100644 (file)
@@ -568,7 +568,7 @@ class Rfc822Header {
             if ($pos > 0)  {
                 $key = trim(substr($prop, 0, $pos));
                 $val = trim(substr($prop, $pos+1));
-                if ($val{0} == '"') {
+                if (strlen($val) > 0 && $val{0} == '"') {
                     $val = substr($val, 1, -1);
                 }
                 $propResultArray[$key] = $val;
@@ -753,4 +753,4 @@ class Rfc822Header {
     }
 }
 
-?>
\ No newline at end of file
+?>