mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2012-06-15 12:10 am

[dw-free] http://bugs.dwscoalition.org/show_bug.cgi?id=4426

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

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

Fix postfix conditional declaring a variable. This is invalid and causes
issues in certain cases.

Patch by [personal profile] exor674.

Files modified:
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r a9e2c39d8b9d -r e1f9665e2072 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Jun 14 23:52:48 2012 +0000
+++ b/cgi-bin/LJ/User.pm	Fri Jun 15 00:14:49 2012 +0000
@@ -209,9 +209,9 @@
     $u->set_prop("adult_content", $opts{journal_adult_settings}) if LJ::is_enabled( 'adult_content' );
     $u->set_default_style;
 
-    my $admin = LJ::load_userid( $opts{admin_userid} )
-        if $opts{admin_userid};
-    $admin ||= LJ::get_remote();
+    my $admin = $opts{admin_userid} ?
+        LJ::load_userid( $opts{admin_userid} ) :
+        LJ::get_remote();
 
     if ( $admin ) {
         LJ::set_rel($u, $admin, "A");  # maintainer
--------------------------------------------------------------------------------