wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r11339: LJSUP-11026: Remove some warnings from l...

Committer: gprochaev
LJSUP-11026: Remove some warnings from log file

U   trunk/cgi-bin/LJ/Setting/AdCategories.pm
Modified: trunk/cgi-bin/LJ/Setting/AdCategories.pm
===================================================================
--- trunk/cgi-bin/LJ/Setting/AdCategories.pm	2012-01-23 09:56:55 UTC (rev 11338)
+++ trunk/cgi-bin/LJ/Setting/AdCategories.pm	2012-01-23 10:22:53 UTC (rev 11339)
@@ -16,8 +16,11 @@
     # read the list of categories from the userprop into a hash
     my $cat_string = $u->prop("ad_categories");
     my %cat_hash;
-    foreach ( split /,/, $cat_string ) {
-        $cat_hash{$_} = 1;
+
+    if ($cat_string) {
+        foreach ( split /,/, $cat_string ) {
+            $cat_hash{$_} = 1;
+        }
     }
 
     my $display_cat = sub {

Tags: gprochaev, ljcom, pm, wisest-owl
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