$hdr_values[$header] = str_replace(', ', ',', $hdr_values[$header]);
}
}
- if ($artid) {
+ if (!is_null($artid)) {
$old =& $this->loadMessage($group, $artid);
$hdr_values['References'] = $old->getHeaderValue('references') . $old->getHeaderValue('message-id');
}
/** fetch data (and on delimitor)
* @param STRING $delim string indicating and of transmission
*/
- private function fetchResult()
+ private function &fetchResult()
{
$array = Array();
while (($result = $this->getLine()) != '.') {
if (!$this->execLine("XGTITLE $pattern ")) {
return false;
}
- $array = $this->fetchResult();
+ $array =& $this->fetchResult();
$groups = array();
- foreach ($array as $result) {
+ foreach ($array as &$result) {
list($group, $desc) = split("[ \t]", $result, 2);
$groups[$group] = $desc;
}
if (!$this->execLine("XHDR $hdr $range ")) {
return false;
}
- $array = $this->fetchResult();
+ $array =& $this->fetchResult();
$headers = array();
foreach ($array as &$result) {
@list($head, $value) = explode(' ', $result, 2);
if (!$this->execLine("XPAT $hdr $range $pat")) {
return false;
}
- $array = $this->fetchResult();
+ $array =& $this->fetchResult();
$headers = array();
foreach ($array as &$result) {
list($head, $value) = explode(' ', $result, 2);