projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d4705a2
)
Trapping fatal error that occurs if you call GetCOinsBiblio with a biblionumber that...
author
Chris Cormack
<chrisc@catalyst.net.nz>
Mon, 22 Mar 2010 22:21:21 +0000
(11:21 +1300)
committer
Galen Charlton
<gmcharlt@gmail.com>
Wed, 7 Apr 2010 12:43:29 +0000
(08:43 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Biblio.pm
patch
|
blob
|
history
diff --git
a/C4/Biblio.pm
b/C4/Biblio.pm
index
17796f3
..
9669752
100755
(executable)
--- a/
C4/Biblio.pm
+++ b/
C4/Biblio.pm
@@
-1146,6
+1146,11
@@
sub GetCOinSBiblio {
my $record = GetMarcBiblio($biblionumber);
# get the coin format
+ if ( ! $record ) {
+ # can't get a valid MARC::Record object, bail out at this point
+ warn "We called GetMarcBiblio with a biblionumber that doesn't exist biblionumber=$biblionumber";
+ return;
+ }
my $pos7 = substr $record->leader(), 7, 1;
my $pos6 = substr $record->leader(), 6, 1;
my $mtx;