* Stupid bugfix
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 16:38:35 +0000 (16:38 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 16:38:35 +0000 (16:38 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1094 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 4c1930b728732796ff28ad06312b9a122824d708..91572e55476b3d19e4d12289416fc45bf04d33e2 100644 (file)
       $elem_num = 1;
       $msg->header = new msg_header();
       $msg->header->entity_id = $ent_id;
+      $properties = array();
       
       while (strlen($structure) > 0) {
          $structure = trim($structure);
             // comment me
             $end = mime_match_parenthesis (0, $structure);
             $sub = substr($structure, 1, $end-1);
-           if (! isset($properties))
-               $properties = array();
             $properties = mime_get_props($properties, $sub);
             $structure = substr($structure, strlen($sub) + 2);
          } else {
       // ignore all extra characters
       // If inside of a string, skip string -- Boundary IDs and other
       // things can have ) in them.
+      if ($char != '(')
+          return strlen($structure);
       while ($pos < strlen($structure)) {
          $pos++;
          $char = substr($structure, $pos, 1);