a more readable way to test an array size.
authorNahuel Angelinetti <nahuel.angelinetti@biblibre.com>
Wed, 15 Oct 2008 09:03:25 +0000 (11:03 +0200)
committerHenri-Damien LAURENT <henridamien@koha-fr.org>
Tue, 27 Jan 2009 11:19:44 +0000 (12:19 +0100)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
reports/guided_reports.pl

index c833466..1013d45 100755 (executable)
@@ -401,7 +401,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 ($#$errors == -1) {
+        if (!@$errors) {
             $no_html=1;
             print $input->header(       -type => 'application/octet-stream',
                                         -attachment=>'reportresults.csv'