Avoid undef warning, provide lanuage failover to 000 (unknown/default)
authorJoe Atzberger <atz@esilibrary.com>
Tue, 1 Jun 2010 17:48:24 +0000 (17:48 +0000)
committerJoe Atzberger <atz@esilibrary.com>
Tue, 1 Jun 2010 17:48:24 +0000 (17:48 +0000)
Sip/MsgType.pm

index 4ddc18f..0b96813 100644 (file)
@@ -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);