From 124e72be4112c79f697b538a46c9435ffd0c72f3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 9 Feb 2015 16:08:05 +0100 Subject: [PATCH] Paginated-Controller-Helfer: undef-Warnungen vermeiden --- SL/Controller/Helper/GetModels/Paginated.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Helper/GetModels/Paginated.pm b/SL/Controller/Helper/GetModels/Paginated.pm index ad5e10c14..d900c18be 100644 --- a/SL/Controller/Helper/GetModels/Paginated.pm +++ b/SL/Controller/Helper/GetModels/Paginated.pm @@ -32,8 +32,8 @@ sub read_params { my $source = $self->get_models->source; my $from_form = { - page => $source->{ $self->form_params->[0] } || 1, - per_page => $source->{ $self->form_params->[1] } * 1, + page => $source->{ $self->form_params->[0] } || 1, + per_page => ($source->{ $self->form_params->[1] } // 0) * 1, }; # my $priv = _priv($self); -- 2.20.1