From 4e788a261f17f0f20fda617531f2515b20a36376 Mon Sep 17 00:00:00 2001 From: djfiander Date: Tue, 30 May 2006 01:02:12 +0000 Subject: [PATCH] Only attempt to add the Patron ID to the Checkin Response message if the ILS actually provides a valid $patron structure --- Sip/MsgType.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 610c576..f5a4271 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -672,7 +672,9 @@ sub handle_checkin { if ($protocol_version eq '2.00') { $resp .= maybe_add(FID_SORT_BIN, $status->sort_bin); - $resp .= maybe_add(FID_PATRON_ID, $status->patron->id); + if ($status->patron) { + $resp .= add_field(FID_PATRON_ID, $status->patron->id); + } $resp .= maybe_add(FID_MEDIA_TYPE, $status->item->sip_media_type); $resp .= maybe_add(FID_ITEM_PROPS, $status->item->sip_item_properties); } -- 2.11.0