--- loncom/interface/lonhtmlcommon.pm 2010/05/30 12:47:05 1.272
+++ loncom/interface/lonhtmlcommon.pm 2010/05/30 18:30:52 1.273
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.272 2010/05/30 12:47:05 droeschl Exp $
+# $Id: lonhtmlcommon.pm,v 1.273 2010/05/30 18:30:52 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2392,6 +2392,7 @@ returns: XHTML list as String.
# \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}}
sub list_from_array {
my ($items, $args) = @_;
+ return unless scalar @$items;
my ($ul, $li) = inittags( qw(ul li) );
my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items;
return $ul->( $listitems, $args->{listattr} );