projects
/
koha_ffzg
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bug 18179: Forbid list context calls for Koha::Objects->find
[koha_ffzg]
/
Koha
/
Objects.pm
diff --git
a/Koha/Objects.pm
b/Koha/Objects.pm
index
7e73297
..
5080e7d
100644
(file)
--- a/
Koha/Objects.pm
+++ b/
Koha/Objects.pm
@@
-78,6
+78,8
@@
my $object = Koha::Objects->find( { keypart1 => $keypart1, keypart2 => $keypart2
sub find {
my ( $self, $id ) = @_;
+ croak 'Cannot use "->find" in list context' if wantarray;
+
return unless defined($id);
my $result = $self->_resultset()->find($id);