You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2013/07/14 19:58:42 UTC

svn commit: r1503007 - /httpd/test/framework/trunk/t/modules/include.t

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);