@@ -, +, @@ my $rs = Koha::Patrons->new; $rs->empty; $ kshell $k prove t/db_dependent/Koha/Objects.t --- Koha/Objects.pm | 4 ++++ 1 file changed, 4 insertions(+) --- a/Koha/Objects.pm +++ a/Koha/Objects.pm @@ -250,6 +250,10 @@ an iterator). sub empty { my ($self) = @_; + unless (ref($self)) { + $self = $self->new; + } + $self->_resultset()->set_cache([]); return $self; --