diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2011-04-21 03:21:41 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-04-21 03:21:41 +0200 |
commit | f297bdbc2744229e8ad6f660af8c97f4c4fbb7a5 (patch) | |
tree | f5caa17f92458e7b3396dcda555feb0136e878fe /Bugzilla | |
parent | 0803a268671081f1dcc932691acde4c353902777 (diff) | |
download | bugzilla-f297bdbc2744229e8ad6f660af8c97f4c4fbb7a5.tar.gz bugzilla-f297bdbc2744229e8ad6f660af8c97f4c4fbb7a5.tar.xz |
Bug 650593: Bugzilla crashes when the database is gone, even when shutdownhtml is set
r=justdave a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Template.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 4de2e815f..93c318456 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -442,9 +442,10 @@ sub _css_link_set { return \%set; } - my $user = Bugzilla->user; + my $skin_user_prefs = Bugzilla->user->settings->{skin}; my $cgi_path = bz_locations()->{'cgi_path'}; - my $all_skins = $user->settings->{'skin'}->legal_values; + # If the DB is not accessible, user settings are not available. + my $all_skins = $skin_user_prefs ? $skin_user_prefs->legal_values : []; my %skin_urls; foreach my $option (@$all_skins) { next if $option eq 'standard'; @@ -456,7 +457,7 @@ sub _css_link_set { } $set{alternate} = \%skin_urls; - my $skin = $user->settings->{'skin'}->{'value'}; + my $skin = $skin_user_prefs->{'value'}; if ($skin ne 'standard' and defined $set{alternate}->{$skin}) { $set{skin} = delete $set{alternate}->{$skin}; } |