case 3:
if (isset($msg->type0) && ($msg->type0 == 'multipart')) {
++$i;
- $res= $msg->parseLanguage($read, $i);
- $arg_a[] = $res[0];
- $i = $res[1];
+ $arg_a[]= $msg->parseLanguage($read, $i);
}
case 7:
if (($arg_a[0] == 'message') && ($arg_a[1] == 'rfc822')) {
$msg->type0 = $arg_a[0];
$msg->type1 = $arg_a[1];
$rfc822_hdr = new Rfc822Header();
- $res = $msg->parseEnvelope($read, $i, $rfc822_hdr);
- $msg->rfc822_header = $res[0];
- $i = $res[1] + 1;
+ $msg->rfc822_header = $msg->parseEnvelope($read, $i, $rfc822_hdr);
while (($i < $cnt) && ($read{$i} != '(')) {
++$i;
}
return $properties;
}
- function parseEnvelope($read, $i, $hdr) {
+ function parseEnvelope($read, &$i, $hdr) {
$arg_no = 0;
$arg_a = array();
$a=0;
for (; $i < $cnt && $read{$i} != ')'; ++$i) {
if ($read{$i} == '(') {
- $res = $this->parseAddress($read, $i);
- $addr = $res[0];
- $i = $res[1];
+ $addr = $this->parseAddress($read, $i);
if (($addr->host == '') && ($addr->mailbox != '')) {
/* start of group */
$group = $addr->mailbox;
$hdr->inreplyto = $arg_a[8]; /* argument 9: in-reply-to */
$hdr->message_id = $arg_a[9]; /* argument 10: message-id */
}
- return (array($hdr, $i));
+ return $hdr;
}
function parseLiteral($read, &$i) {
return $s;
}
- function parseAddress($read, $i) {
+ function parseAddress($read, &$i) {
$arg_a = array();
for (; $read{$i} != ')'; ++$i) {
} else {
$adr = '';
}
- return (array($adr, $i));
+ return $adr;
}
function parseDisposition($read, &$i) {