From 32f2c2eb73ac1a4258b76ae9c822b87657302382 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Tue, 1 Jun 2010 17:48:24 +0000 Subject: [PATCH] Avoid undef warning, provide lanuage failover to 000 (unknown/default) --- Sip/MsgType.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 4ddc18f..0b96813 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -731,12 +731,13 @@ sub handle_block_patron { # we'll just say, "Unspecified", as per the spec. Let the # terminal default to something that, one hopes, will be # intelligible + my $language = $patron ? $patron->language : '000'; if ($patron) { # Valid patron id $patron->block($card_retained, $blocked_card_msg); } - $resp = build_patron_status($patron, $patron->language, $fields); + $resp = build_patron_status($patron, $language, $fields); $self->write_msg($resp); return(BLOCK_PATRON); -- 2.11.0