projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c679e6
)
better qsearchs warning
author
ivan
<ivan>
Sat, 21 Dec 2002 10:02:24 +0000
(10:02 +0000)
committer
ivan
<ivan>
Sat, 21 Dec 2002 10:02:24 +0000
(10:02 +0000)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
ebcbbb4
..
4021510
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-330,9
+330,11
@@
for a single item, or your data is corrupted.
=cut
sub qsearchs { # $result_record = &FS::Record:qsearchs('table',\%hash);
=cut
sub qsearchs { # $result_record = &FS::Record:qsearchs('table',\%hash);
+ my $table = $_[0];
my(@result) = qsearch(@_);
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]) : ();
}
scalar(@result) ? ($result[0]) : ();
}