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)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 3 Apr 2019 13:59:06 +0000 (15:59 +0200)
modules/override/PDF/Table.pm

index 31045f0..853e0ee 100755 (executable)
@@ -505,8 +505,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;
             }