Bug 19061: [QA Follow-up] Wrong interpolation
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 11 Aug 2017 06:11:20 +0000 (08:11 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Aug 2017 15:17:43 +0000 (12:17 -0300)
Interpolating "$object->method" does not work.
Unable to execute query [Object class]=HASH(0x3c21cc8)->method.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

reports/cash_register_stats.pl

index 9ce0dca..158625d 100755 (executable)
@@ -106,8 +106,8 @@ if ($do_it) {
         $whereBranchCode
         ORDER BY al.date
     ";
-    my $sth_stats = $dbh->prepare($query) or die "Unable to prepare query $dbh->errstr";
-    $sth_stats->execute($fromDate, $toDate, @extra_params) or die "Unable to execute query $sth_stats->errstr";
+    my $sth_stats = $dbh->prepare($query) or die "Unable to prepare query " . $dbh->errstr;
+    $sth_stats->execute($fromDate, $toDate, @extra_params) or die "Unable to execute query " . $sth_stats->errstr;
 
     my @loopresult;
     my $grantotal = 0;