From c1f20717d1ba465faad68601b04df7acc492ba95 Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Thu, 11 Mar 2010 01:28:37 +0000 Subject: [PATCH] BUGFIX: returns null when there's no blog IDs --- code/ArchiveWidget.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ArchiveWidget.php b/code/ArchiveWidget.php index 0746d11..d614db0 100644 --- a/code/ArchiveWidget.php +++ b/code/ArchiveWidget.php @@ -48,6 +48,8 @@ class ArchiveWidget extends Widget { $container = BlogTree::current(); $ids = $container->BlogHolderIDs(); + if(empty($ids)) return $results; + $stage = Versioned::current_stage(); $suffix = (!$stage || $stage == 'Stage') ? "" : "_$stage";