From fd75f94f2e57bd621ed724d4b302cd6e4567c268 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Thu, 31 Mar 2011 09:21:13 -0400 Subject: [PATCH] Check for sip_expire before trying to use it. Signed-off-by: Thomas Berezansky --- Sip/MsgType.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.43.2