diff --git a/public/vroom.pl b/public/vroom.pl index f1bca38..8e4f329 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -383,7 +383,10 @@ helper delete_rooms => sub { $self->db->prepare("SELECT `name` FROM `rooms` WHERE `activity_timestamp` < $timeout AND `persistent`='0';") } || return undef; $sth->execute(); - my @toDeleteName = $sth->fetchrow_array; + my @toDeleteName = (); + while (my $room = $sth->fetchrow_array){ + push @toDeleteName, $room; + } my @toDeleteId = (); if ($config->{persistentInactivityTimeout} > 0){ $timeout = time()-$config->{persistentInactivityTimeout};