[Koha-patches] [PATCH] Bad check of a variable, disabling exporting with "guided reports" (bug #2672(only in 3.0.x))

Nahuel Angelinetti nahuel.angelinetti at biblibre.com
Tue Oct 14 17:29:26 CEST 2008


---
 reports/guided_reports.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl
index 9d80314..1fa939b 100755
--- a/reports/guided_reports.pl
+++ b/reports/guided_reports.pl
@@ -399,7 +399,7 @@ elsif ($phase eq 'Export'){
 	my $sql = $input->param('sql');
         my $format = $input->param('format');
 	my ($results, $total, $errors) = execute_query($sql,1,0,0,$format);
-        if (!defined($errors)) {
+        if ( @$errors eq 0 ) {
             $no_html=1;
             print $input->header(       -type => 'application/octet-stream',
                                         -attachment=>'reportresults.csv'
-- 
1.5.4.3




More information about the Koha-patches mailing list