From: Sven Schöling Date: Fri, 26 Feb 2016 09:19:28 +0000 (+0100) Subject: PDF::Table - einige undefined warnings gefixt X-Git-Tag: release-3.4.1~391 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=392d31d235358c1e9f083719936715789a52adc6;p=kivitendo-erp.git PDF::Table - einige undefined warnings gefixt --- diff --git a/modules/override/PDF/Table.pm b/modules/override/PDF/Table.pm index 1b7917b29..3160b29dd 100644 --- a/modules/override/PDF/Table.pm +++ b/modules/override/PDF/Table.pm @@ -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; }