Bug 14118 - Silence warnings t/DataTables/Members.t
Summary: Silence warnings t/DataTables/Members.t
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: M. Tompsett
QA Contact: Galen Charlton
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 8879
  Show dependency treegraph
 
Reported: 2015-05-02 02:11 UTC by M. Tompsett
Modified: 2016-12-05 21:23 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14118: Silence warnings t/DataTables/Members.t (1.49 KB, patch)
2015-05-02 02:41 UTC, M. Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14118: Silence warnings t/DataTables/Members.t (1.59 KB, patch)
2015-05-15 22:27 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14118: Silence warnings t/DataTables/Members.t (1.64 KB, patch)
2015-05-22 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
[COUNTER-PATCH] Bug 14118: Prevent to save a letter if an error occurred (2.11 KB, patch)
2015-05-22 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description M. Tompsett 2015-05-02 02:11:24 UTC
A couple uninitialized variable warnings when a prove -r t is issued.
Comment 1 M. Tompsett 2015-05-02 02:12:22 UTC
I know that bug 8879 is just "prove ./t", but I think it is reasonable to extend that omnibus to include "prove -r ./t".
Comment 2 M. Tompsett 2015-05-02 02:41:56 UTC Comment hidden (obsolete)
Comment 3 Bernardo Gonzalez Kriegel 2015-05-15 22:27:33 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-05-22 09:36:57 UTC
Comment on attachment 39229 [details] [review]
[SIGNED-OFF] Bug 14118: Silence warnings t/DataTables/Members.t

Review of attachment 39229 [details] [review]:
-----------------------------------------------------------------

Not blocker.

::: C4/Utils/DataTables/Members.pm
@@ +103,4 @@
>  
>      my $limit;
>      # If iDisplayLength == -1, we want to display all patrons
> +    if ( !$dt_params->{iDisplayLength} || $dt_params->{iDisplayLength} > -1 ) {

What about
    if ( not $dt_params->{iDisplayLength} or $dt_params->{iDisplayLength} > -1 ) {

@@ +107,3 @@
>          # In order to avoid sql injection
> +        $dt_params->{iDisplayStart} =~ s/\D//g if defined($dt_params->{iDisplayStart});
> +        $dt_params->{iDisplayLength} =~ s/\D//g if defined($dt_params->{iDisplayLength});

useless use of parenthesis.
Comment 5 Jonathan Druart 2015-05-22 09:37:20 UTC
Created attachment 39386 [details] [review]
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>
Comment 6 Jonathan Druart 2015-05-22 10:01:32 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-05-22 10:02:36 UTC
Erk, wrong bug report. Sorry about that.
Comment 8 Tomás Cohen Arazi 2015-05-22 14:19:26 UTC
Patch pushed to master.

Thanks Mark!