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] changelog2009-03-17 08:41 pm

[dw-free] Allow importing of your journal from another LiveJournal-based site.

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

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

If the user had no default userpic, the import would crash. Fixed.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/DW/Worker/ContentImporter/Local/Userpics.pm
--------------------------------------------------------------------------------
diff -r 34221b3e72bc -r d78e4bae432d cgi-bin/DW/Worker/ContentImporter/Local/Userpics.pm
--- a/cgi-bin/DW/Worker/ContentImporter/Local/Userpics.pm	Tue Mar 17 17:25:26 2009 +0000
+++ b/cgi-bin/DW/Worker/ContentImporter/Local/Userpics.pm	Tue Mar 17 20:41:00 2009 +0000
@@ -73,8 +73,9 @@ sub import_userpics {
     };
 
     # attempt to import the default userpic first, if they have at least one
-    # slot available
-    $import_userpic->( $default );
+    # slot available, but only if they HAVE a default.
+    $import_userpic->( $default )
+        if $default && $default->{src};
 
     # now bail out if we don't have room for everything
     return @imported
--------------------------------------------------------------------------------

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