diff options
author | ivan <ivan> | 2006-08-26 02:12:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-26 02:12:54 +0000 |
commit | f4eb2dd15795c2f9da636ee084516cbafef7fbd5 (patch) | |
tree | da968159582c75c09f128b2f76dae30a329e4b1a /FS | |
parent | 7517eaa583bcb213b62dfd0c11288aa50a350e8a (diff) |
foiled by autovivification!
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Record.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index cc7f551e9..713b96767 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -388,7 +388,9 @@ sub qsearch { my %result; tie %result, "Tie::IxHash"; my @stuff = @{ $sth->fetchall_arrayref( {} ) }; - if ( $pkey && $stuff[0]->{$pkey} ) { + #if ( $pkey ) { + #if ( $pkey && $stuff[0]->{$pkey} ) { + if ( $pkey && scalar(@stuff) && $stuff[0]->{$pkey} ) { %result = map { $_->{$pkey}, $_ } @stuff; } else { @result{@stuff} = @stuff; |