don't call ->value if no setting exists, return empty string
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Oct 2008 15:56:30 +0000 (15:56 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Oct 2008 15:56:30 +0000 (15:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10807 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index e34e4b2..b187291 100644 (file)
@@ -148,6 +148,7 @@ sub user_settings {
 
     if($setting) {
         my $val = $e->search_actor_user_setting({usr => $user_id, name => $setting})->[0];
+        return '' unless $val;
         return OpenSRF::Utils::JSON->JSON2perl($val->value);
     } else {
         my $s = $e->search_actor_user_setting({usr => $user_id});