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-28 02:32 pm

[dw-free] hush warnings when editing profile

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

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

Return early if we can't do anything here to avoid warnings.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/TextMessage.pm
  • cgi-bin/LJ/Widget/Location.pm
--------------------------------------------------------------------------------
diff -r 95a601bcc9a4 -r bd5de7e0ffd5 cgi-bin/LJ/TextMessage.pm
--- a/cgi-bin/LJ/TextMessage.pm	Tue Dec 28 22:29:34 2010 +0800
+++ b/cgi-bin/LJ/TextMessage.pm	Tue Dec 28 22:32:37 2010 +0800
@@ -905,7 +905,9 @@ sub provider_info
 }
 
 sub remap {
-    my $provider = shift;
+    my ( $provider ) = @_;
+    return unless defined $provider;
+
     return "o2mmail" if $provider eq "btcellnet";
     return "voicestream" if $provider eq "voicestream2";
     return "tmobileusa" if $provider eq "tmomail";
diff -r 95a601bcc9a4 -r bd5de7e0ffd5 cgi-bin/LJ/Widget/Location.pm
--- a/cgi-bin/LJ/Widget/Location.pm	Tue Dec 28 22:29:34 2010 +0800
+++ b/cgi-bin/LJ/Widget/Location.pm	Tue Dec 28 22:32:37 2010 +0800
@@ -248,8 +248,8 @@ sub handle_post {
 }
 
 sub country_regions_cfg {
-    my $class = shift;
-    my $country = shift;
+    my ( $class, $country ) = @_;
+    return unless defined $country;
     return $LJ::COUNTRIES_WITH_REGIONS{$country};
 }
 
--------------------------------------------------------------------------------