X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Fmbox.inc.php;h=3483cecba5d0fe7ee73bcf3636e2e83f91e90593;hb=797579f4e251bdaabe7e0e8d0b3b57ee40ae111f;hp=f48c877f8df8a7710d1f146541fa2d710483688a;hpb=4e9340f51e50affa2b89211981580d33a27a9ff4;p=banana.git diff --git a/banana/mbox.inc.php b/banana/mbox.inc.php index f48c877..3483cec 100644 --- a/banana/mbox.inc.php +++ b/banana/mbox.inc.php @@ -108,7 +108,10 @@ class BananaMBox implements BananaProtocoleInterface { $options = array(); if (@filesize($this->getFileName()) == @Banana::$spool->storage['size']) { - return max(array_keys(Banana::$spool->overview)) + 1; + if (!empty(Banana::$spool->overview)) { + return max(array_keys(Banana::$spool->overview)) + 1; + } + return 1; } $this->getMBoxPosition($options); $val =& $this->callHelper('-c', $options);