PDF::Table - einige undefined warnings gefixt
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 26 Feb 2016 09:19:28 +0000 (10:19 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 26 Feb 2016 09:19:28 +0000 (10:19 +0100)
modules/override/PDF/Table.pm

index 1b7917b..3160b29 100644 (file)
@@ -491,8 +491,12 @@ sub table
                 $rows_height->[$row_idx] = $cell_font_size;
             }
 
+            if (!defined $data->[$row_idx][$column_idx]) {
+              $data->[$row_idx][$column_idx] = ' ';
+            }
+
             # This should fix a bug with very long words like serial numbers etc.
-            if( $max_word_len > 0 )
+            if( $max_word_len > 0 && $data->[$row_idx][$column_idx])
             {
                 $data->[$row_idx][$column_idx] =~ s#(\S{$max_word_len})(?=\S)#$1 #g;
             }