Don't fail if the subscription list is invalid
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 28 Jul 2007 18:21:20 +0000 (18:21 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:48 +0000 (00:35 +0100)
 nntp.inc.php |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@270 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/nntp.inc.php

index a7f2e5c..6245803 100644 (file)
@@ -61,7 +61,11 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
             } else {
                 $list = $this->listGroups();
                 if ($mode == Banana::BOXES_SUB) {
-                    $sub = array_flip(Banana::$profile['subscribe']);
+                    if (is_array(Banana::$profile['subscribe'])) {
+                        $sub = array_flip(Banana::$profile['subscribe']);
+                    } else {
+                        $sub = array();
+                    }
                     $list = array_intersect_key($list, $sub);
                 }
             }