X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDBUtils.pm;h=89761443bb378a3380a8722986b6ea0752da1995;hb=e83604f2c7d6d499d9db8d066cc7f637e6f609de;hp=8e1ad458a0abb214773c93cb4426c64558b0111d;hpb=da364d0f6dd660d289f890c1423b0c0dd51f690c;p=kivitendo-erp.git 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 } }; } }