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 9cc82fb..7626f47 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 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
+?>