fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-12-16 02:57 pm

[dw-free] fix warning from LJ/S2.pm - don't needlessly de-re-reference hashrefs

[commit: http://hg.dwscoalition.org/dw-free/rev/8c90fc6a9f74]

http://bugs.dwscoalition.org/show_bug.cgi?id=3327

Hush more warnings.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/S2.pm
--------------------------------------------------------------------------------
diff -r 7563fc11f80c -r 8c90fc6a9f74 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm	Thu Dec 16 22:53:38 2010 +0800
+++ b/cgi-bin/LJ/S2.pm	Thu Dec 16 22:57:45 2010 +0800
@@ -88,7 +88,7 @@ sub make_journal
     # let layouts disable EntryPage / ReplyPage, using the BML version
     # instead.  Unless we are using siteviews, because that is what
     # will be handling the "BML" views.
-    if ($styleid eq "siteviews") {
+    if ( $styleid && $styleid eq "siteviews" ) {
         $r->notes->{ 'no_control_strip' } = 1;
 
         # kill the flag
@@ -735,9 +735,9 @@ sub s2_context
         }
     };
 
-    if ( $styleid eq "siteviews" ) {
+    if ( $styleid && $styleid eq "siteviews" ) {
         %style = siteviews_style( $u, $remote, $opts{mode} );
-    } elsif ( $styleid eq "sitefeeds" ) {
+    } elsif ( $styleid && $styleid eq "sitefeeds" ) {
         %style = sitefeeds_style();
     }
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org