Add famfamfam in credits
[banana.git] / banana / NetNNTP.inc.php
index 45af23f..3934cd5 100644 (file)
@@ -46,7 +46,7 @@ class nntp
             $result        = $this->gline();
             $this->posting = ($result{0}=="200");
         }
-        if ($result{0}=="2" && $url['user'] && $url['user']!='anonymous') {
+        if ($result{0}=="2" && isset($url['user']) && $url['user'] != 'anonymous') {
             return $this->authinfo($url['user'], $url['pass']);
         }
         return ($result{0}=="2");
@@ -475,8 +475,9 @@ class nntp
             
         $array  = array();
         while (($result = $this->gline()) != '.') {
-            preg_match("/([^ \t]+) (.*)$/", $result, $regs);
-            $array[$regs[1]] = $regs[2];
+            if (preg_match("/([^ \t]+) (.*)$/", $result, $regs)) {
+                $array[$regs[1]] = $regs[2];
+            }
         }
         return $array;
     }
@@ -507,4 +508,5 @@ class nntp
     }
 }
 
+// vim:set et sw=4 sts=4 ts=4 
 ?>