prevent warnings that occur when the event type is not defined
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Jun 2010 17:30:47 +0000 (17:30 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Jun 2010 17:30:47 +0000 (17:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16582 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Event.pm

index 59d6e03..5d5708e 100644 (file)
@@ -23,7 +23,7 @@ sub new {
        _load_events() unless $events;
 
        throw OpenSRF::EX ("Bad event name: $event") unless $event;
-       my $e = $events->{$event};
+       my $e = $events->{$event} || '';
 
        my( $m, $f, $l ) = caller(0);
        my( $mm, $ff, $ll ) = caller(1);
@@ -44,7 +44,7 @@ sub new {
                ilsevent                => $e, 
                textcode                => $event, 
                stacktrace      => "$f:$l $ff:$ll $fff:$lll", 
-               desc                    => $descs->{$lang}->{$e || ''} || '',
+               desc                    => $descs->{$lang}->{$e} || '',
                servertime      => $t,
                pid                     => $$, %params };
 }