X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/da364d0f6dd660d289f890c1423b0c0dd51f690c..5dd5e97bc9fe0aee0be2621fe11d48c86be40a5d:/SL/DBUtils.pm diff --git a/SL/DBUtils.pm b/SL/DBUtils.pm index 8e1ad458a..89761443b 100644 --- a/SL/DBUtils.pm +++ b/SL/DBUtils.pm @@ -222,11 +222,11 @@ sub selectall_as_map { my %hash; if ('' eq ref $value_col) { while (my $ref = $sth->fetchrow_hashref()) { - $hash{$ref->{$key_col}} = $ref->{$value_col}; + $hash{$ref->{$key_col} // ''} = $ref->{$value_col}; } } else { while (my $ref = $sth->fetchrow_hashref()) { - $hash{$ref->{$key_col}} = { map { $_ => $ref->{$_} } @{ $value_col } }; + $hash{$ref->{$key_col} // ''} = { map { $_ => $ref->{$_} } @{ $value_col } }; } }