httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1503007 - /httpd/test/framework/trunk/t/modules/include.t
Date Sun, 14 Jul 2013 17:58:42 GMT
Author: rjung
Date: Sun Jul 14 17:58:41 2013
New Revision: 1503007

URL: http://svn.apache.org/r1503007
Log:
Fix: Use of uninitialized value in scalar
assignment at t/modules/include.t line 346.

And: && has higher precedence than "=".
IMHO "&&" was meant to be run after the
assignment similar to the shell idiom.

Modified:
    httpd/test/framework/trunk/t/modules/include.t

Modified: httpd/test/framework/trunk/t/modules/include.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/include.t?rev=1503007&r1=1503006&r2=1503007&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/include.t (original)
+++ httpd/test/framework/trunk/t/modules/include.t Sun Jul 14 17:58:41 2013
@@ -322,7 +322,7 @@ else {
     my $httpdtz = $1 if $result =~ /\w+, \d+-\w+-\d+ \d+:\d+:\d+ (\w+) /;
 
     my $oldtimezone = $ENV{TZ};
-    ($ENV{TZ} = $httpdtz && tzset) if $httpdtz;
+    (($ENV{TZ} = $httpdtz) && tzset) if $httpdtz;
 
     my $file = catfile($htdocs, splitpath($dir), "file.shtml");
     my $mtime = (stat $file)[9];
@@ -343,7 +343,13 @@ else {
         $strftime->("%s"),
         $strftime->("%s");
 
-    $ENV{TZ} = $oldtimezone && tzset;
+    if (defined($oldtimezone)) {
+        $ENV{TZ} = $oldtimezone;
+    }
+    else {
+        delete($ENV{TZ});
+    }
+    tzset;
 
     # trim output
     $expected = single_space($expected);



Mime
View raw message