Check and make sure the header property value is actually set to something before...
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 30 Oct 2004 21:12:13 +0000 (21:12 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 30 Oct 2004 21:12:13 +0000 (21:12 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8277 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
class/mime/Rfc822Header.class.php

index 9cc82fb467afb77c8075e92c352faa08d5ec4fce..7626f47ca2ca746e9bf1dcbf373259cdd0332f43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -138,6 +138,7 @@ Version 1.5.1 -- CVS
   - Fixed SquirrelSpell error output.  Patch courtesy David Boone.
   - Fixed bug in IMAP read routines that treated "0" as false instead of
     a string (patch courtesy Maurice Makaay).
+  - Fixed PHP notice when header property value is blank
 
 Version 1.5.0
 --------------------
index 5ff139eb9d006062e3a0bff412e01e4835f87e12..40b93913f0b15c9e6dedd7f68208de305539f2ed 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
+?>