[open-ils-commits] r13215 - trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri May 22 10:18:10 EDT 2009
Author: dbs
Date: 2009-05-22 10:18:08 -0400 (Fri, 22 May 2009)
New Revision: 13215
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Holding.pm
Log:
Protect against the horrifying possibility that a caption might not exist
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Holding.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Holding.pm 2009-05-21 13:18:00 UTC (rev 13214)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Holding.pm 2009-05-22 14:18:08 UTC (rev 13215)
@@ -28,7 +28,7 @@
foreach my $subfield ($self->subfields) {
my ($key, $val) = @$subfield;
- if (($caption->enumeration_is_chronology && $key =~ /[a-h]/) || $key =~ /[i-m]/) {
+ if (($caption && $caption->enumeration_is_chronology && $key =~ /[a-h]/) || $key =~ /[i-m]/) {
# Chronology
$self->{_mfhdh_SUBFIELDS}->{$key} = $val;
} elsif ($key =~ /[a-h]/) {
@@ -238,7 +238,7 @@
my $self = shift;
foreach my $key (keys %{$self->{_mfhdh_SUBFIELDS}}) {
- if (!$self->{_mfhdh_CAPTION}->capfield($key)) {
+ if (!($self->{_mfhdh_CAPTION}) && $self->{_mfhdh_CAPTION}->capfield($key)) {
return 0;
}
}
More information about the open-ils-commits
mailing list