# Copyright 2000-2002 Katipo Communications
# Parts Copyright 2010 Nelsonville Public Library
+# Parts copyright 2010 BibLibre
#
# This file is part of Koha.
#
my $sth = $dbh->prepare("SELECT DISTINCT category FROM authorised_values ORDER BY category");
$sth->execute;
my @results;
- while (my $category = $sth->fetchrow_array) {
+ while (defined (my $category = $sth->fetchrow_array) ) {
push @results, $category;
}
return \@results;