Return early before processing if we weren't able to get a URL.
Patch by fu.
diffs (15 lines):
diff -r 6f4a246e970a -r b4ded6f957d3
cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
--- a/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Wed Apr 20 11:12:08
2011 +0800
+++ b/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Wed Apr 20 11:15:43
2011 +0800
@@ -247,9 +247,10 @@ sub remap_username_friend {
if ( $data =~ m!<ownerName>(.+?)</ownerName>! ) {
my $url = $1;
+ return undef unless $url;
+
$url = "http://$url/"
unless $url =~ m/^https?:/;
- return undef unless $url;
if ( $url =~ m!http://(.+)\.$LJ::DOMAIN\/$! ) {
# this appears to be a local user!
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog