kohabug 2345: bad comparisons pervade reports
[koha_fer] / reports / acquisitions_stats.pl
index c5c4036..efa7bf2 100755 (executable)
@@ -657,9 +657,9 @@ sub calculate {
     while ( my ( $row, $col, $value ) = $dbcalc->fetchrow ) {
                next if ($row eq undef || $col eq undef);
                #warn "filling table $row / $col / $value ";
-        $emptycol = 1         if ( $col eq undef );
-        $col      = "zzEMPTY" if ( $col eq undef );
-        $row      = "zzEMPTY" if ( $row eq undef );
+        $emptycol = 1         if ( !defined($col) );
+        $col      = "zzEMPTY" if ( !defined($col) );
+        $row      = "zzEMPTY" if ( !defined($row) );
 
         $table{$row}->{$col}     += $value;
         $table{$row}->{totalrow} += $value;