vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17252: Add condition to remove 'Use of uninitia...

Committer: vsukhanov
Add condition to remove 'Use of uninitialized value in pattern match' warning.
U   trunk/cgi-bin/LJ/Setting/ImagePlaceholders.pm
Modified: trunk/cgi-bin/LJ/Setting/ImagePlaceholders.pm
===================================================================
--- trunk/cgi-bin/LJ/Setting/ImagePlaceholders.pm	2010-09-01 10:34:05 UTC (rev 17251)
+++ trunk/cgi-bin/LJ/Setting/ImagePlaceholders.pm	2010-09-01 11:43:56 UTC (rev 17252)
@@ -29,7 +29,7 @@
 
     my ($maxwidth, $maxheight) = (0, 0);
     ($maxwidth, $maxheight) = ($1, $2)
-        if $imgplaceholders =~ /^(\d+)\|(\d+)$/;
+        if $imgplaceholders and $imgplaceholders =~ /^(\d+)\|(\d+)$/;
 
     my $is_stock = {
         "320|240" => 1,

Tags: livejournal, pm, vadvs
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