Added basic CSS support.
[squirrelmail.git] / functions / imap_messages.php
index dee22165663967b710938bf69051c4fdfc86923d..d7f01665e22754b58daf34b04311e1b00c16589b 100755 (executable)
@@ -64,7 +64,7 @@
             $date = substr($read[$i], 5);
          } else if (eregi ("^subject:", $read[$i])) {
             $subject = htmlspecialchars(eregi_replace ("^subject: ", "", $read[$i]));
-            if (strlen($subject) == 0)
+            if (strlen(Chop($subject)) == 0)
                $subject = _("(no subject)");
          }
                }       
 
          /** ERROR CORRECTION **/
          else if (substr($read[$i], 0, 1) == ")") {
-            if ($header["SUBJECT"] == "")
+            if (strlen(trim($header["SUBJECT"])) == 0)
                 $header["SUBJECT"] = _("(no subject)");
 
-            if ($header["FROM"] == "")
+            if (strlen(trim($header["FROM"])) == 0)
                 $header["FROM"] = _("(unknown sender)");
 
-            if ($header["DATE"] == "")
+            if (strlen(trim($header["DATE"])) == 0)
                 $header["DATE"] = time();
             $i++;
          }