Bug 14118: Silence warnings t/DataTables/Members.t

After cleaning 'prove t' up. 'prove -r t' was attempted next.
A couple uninitialized variable warning were triggered.

TEST PLAN
----------
1) prove t/DataTables/Members.t
   -- warnings.
2) apply patch
3) prove t/DataTables/Members.t
   -- no warnings.
4) koha qa test tools.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Cleaned. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Mark Tompsett 2015-05-01 22:14:21 -04:00 committed by Tomas Cohen Arazi
parent 5d8aa7b70b
commit cdcba6846c
1 changed files with 3 additions and 3 deletions

View File

@ -103,10 +103,10 @@ sub search {
my $limit;
# If iDisplayLength == -1, we want to display all patrons
if ( $dt_params->{iDisplayLength} > -1 ) {
if ( !$dt_params->{iDisplayLength} || $dt_params->{iDisplayLength} > -1 ) {
# In order to avoid sql injection
$dt_params->{iDisplayStart} =~ s/\D//g;
$dt_params->{iDisplayLength} =~ s/\D//g;
$dt_params->{iDisplayStart} =~ s/\D//g if defined($dt_params->{iDisplayStart});
$dt_params->{iDisplayLength} =~ s/\D//g if defined($dt_params->{iDisplayLength});
$dt_params->{iDisplayStart} //= 0;
$dt_params->{iDisplayLength} //= 20;
$limit = "LIMIT $dt_params->{iDisplayStart},$dt_params->{iDisplayLength}";