holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r12963: LJSUP-14407: Remove warnings from errorl...

Committer: akanashin
LJSUP-14407: Remove warnings from errorlog (cgi-bin/LJ/PartnerSite.pm)
U   trunk/cgi-bin/LJ/PartnerSite.pm
Modified: trunk/cgi-bin/LJ/PartnerSite.pm
===================================================================
--- trunk/cgi-bin/LJ/PartnerSite.pm	2012-11-28 14:56:46 UTC (rev 12962)
+++ trunk/cgi-bin/LJ/PartnerSite.pm	2012-11-29 08:42:07 UTC (rev 12963)
@@ -251,8 +251,12 @@
         
         _init_cache() unless $is_cache_initialized;
 
-        $v =~ s/-/_/g;
-        my $row = $search_cache{$field}->{$v};
+        my $row;
+        if ($v) {
+            $v =~ s/-/_/g;
+            $row = $search_cache{$field}->{$v};
+        }
+
         return unless $row;
         return $class->_new_from_config_row(%$row);
     };

Tags: akanashin, holyandrew, ljcom, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments