Bug 23982: Fix the failing test
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 20 Nov 2019 08:49:23 +0000 (09:49 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 20 Nov 2019 09:00:17 +0000 (09:00 +0000)
    #   Failed test 'nb_rows returns 0 on bad queries'
    #   at t/db_dependent/Reports/Guided.t line 441.
    #          got: undef
    #     expected: '0'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Reports/Guided.pm

index 341c78b..e20c99b 100644 (file)
@@ -427,7 +427,8 @@ sub nb_rows {
 
 
     my $dbh = C4::Context->dbh;
-    my ( $sth, $n );
+    my $sth;
+    my $n = 0;
 
     my $RaiseError = $dbh->{RaiseError};
     my $PrintError = $dbh->{PrintError};