Henry Lyne ([info]henrylyne) wrote in [info]changelog,
@ 2009-07-09 18:53:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
[livejournal] r15457: Fix error when layout layer is deleted b...
Committer: henrylyne
Fix error when layout layer is deleted but the style still is defined.

Patch by afuna: http://changelog.dreamwidth.org/229197.html

U   trunk/cgi-bin/LJ/Customize.pm
Modified: trunk/cgi-bin/LJ/Customize.pm
===================================================================
--- trunk/cgi-bin/LJ/Customize.pm	2009-07-09 18:21:20 UTC (rev 15456)
+++ trunk/cgi-bin/LJ/Customize.pm	2009-07-09 18:53:50 UTC (rev 15457)
@@ -88,6 +88,14 @@
 
     my $style = LJ::S2::load_style($u->prop('s2_style'));
 
+    unless ( $style && $style->{layer}->{layout} ) {
+        # we have no layout layer for this style, which causes errors in
+        # the customization interface
+        # undef current style and force them to use the site defaults
+        $u->set_prop( s2_style => 0 );
+        $style = undef;
+    }
+
     unless ($style && $style->{'userid'} == $u->{'userid'}) {
         my $theme;
         if ($LJ::DEFAULT_STYLE->{theme}) {



(1 comment) - (Post a new comment)


[info]av8rmike
2009-07-10 12:48 pm UTC (link)
This fix resolves LJSV-629, correct?

(Reply to this)


(1 comment) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…