summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-12-21 10:02:26 +0000
committerivan <ivan>2002-12-21 10:02:26 +0000
commitffc7e8567d9bfb6c695dc36cd0257e61c0268b74 (patch)
tree9034e93de11f89eafb130b83f25b6c27ae9d5805
parentedff30e91cbbfd05bf36f6574233e8f8d1da8783 (diff)
better qsearchs warning
-rw-r--r--FS/FS/Record.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 0ffd90951..31b6070a3 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -332,9 +332,11 @@ for a single item, or your data is corrupted.
=cut
sub qsearchs { # $result_record = &FS::Record:qsearchs('table',\%hash);
+ my $table = $_[0];
my(@result) = qsearch(@_);
- carp "warning: Multiple records in scalar search!" if scalar(@result) > 1;
- #should warn more vehemently if the search was on a primary key?
+ carp "warning: Multiple records in scalar search ($table)"
+ if scalar(@result) > 1;
+ #should warn more vehemently if the search was on a primary key?
scalar(@result) ? ($result[0]) : ();
}