First index to show must be a linear index and not a message number
[banana.git] / banana / spool.inc.php
index ef3e36f..2a6be2e 100644 (file)
@@ -178,7 +178,7 @@ class BananaSpool
         $msgids   = $banana->nntp->xhdr('Message-ID', $arg);
         $refs     = $banana->nntp->xhdr('References', $arg);
 
-        if (is_array($this->ids)) {
+        if (is_array(@$this->ids)) {
             $this->ids = array_merge($this->ids, array_flip($msgids));
         } else {
             $this->ids = array_flip($msgids);
@@ -186,7 +186,7 @@ class BananaSpool
 
         foreach ($msgids as $id=>$msgid) {
             $msg                = new BananaSpoolHead($dates[$id], $subjects[$id], $froms[$id]);
-            $refs[$id]          = str_replace('><', '> <', $refs[$id]);
+            $refs[$id]          = str_replace('><', '> <', @$refs[$id]);
             $msgrefs            = preg_split("/[ \t]/", strtr($refs[$id], $this->ids));
             $parents            = preg_grep('/^\d+$/', $msgrefs);
             $msg->parent        = array_pop($parents);