From: Thomas Berezansky Date: Thu, 31 Mar 2011 13:21:13 +0000 (-0400) Subject: Check for sip_expire before trying to use it. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c8e2ac5fe68961219095ab1b42486b161ce68e48;p=working%2FSIPServer.git Check for sip_expire before trying to use it. Signed-off-by: Thomas Berezansky --- diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 2d828ff..b4acdbb 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -969,7 +969,9 @@ sub handle_patron_info { # SIP 2.0 extensions used by Envisionware # Other types of terminals will ignore the fields, if # they don't recognize the codes - $resp .= maybe_add(FID_PATRON_EXPIRE, $patron->sip_expire); + if ($patron->can('sip_expire')) { + $resp .= maybe_add(FID_PATRON_EXPIRE, $patron->sip_expire); + } $resp .= maybe_add(FID_PATRON_BIRTHDATE, $patron->sip_birthdate); $resp .= maybe_add(FID_PATRON_CLASS, $patron->ptype);