]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 310070: runtests.pl reports errors when the 'shutdownhtml' parameter is turned on.
authorwurblzap%gmail.com <>
Sat, 3 Dec 2005 06:16:36 +0000 (06:16 +0000)
committerwurblzap%gmail.com <>
Sat, 3 Dec 2005 06:16:36 +0000 (06:16 +0000)
Patch by Marc Schumann <wurblzap@gmail.com>,
r=LpSolit, r=mkanat, a=justdave

Bugzilla.pm

index 115d15e57561c112865caae708e7e2a56d0d6210..86d6e6e70de5d9d0e665839c2fb8f25bfb6b9bc2 100644 (file)
@@ -61,9 +61,15 @@ use constant SHUTDOWNHTML_EXIT_SILENTLY => [
 # message to the user about the downtime and log out.  Scripts listed in 
 # SHUTDOWNHTML_EXEMPT are exempt from this message.
 #
+# Because this is code which is run live from perl "use" commands of other
+# scripts, we're skipping this part if we get here during a perl syntax check
+# -- runtests.pl compiles scripts without running them, so we need to make sure
+# that this check doesn't apply to 'perl -c' calls.
+#
 # This code must go here. It cannot go anywhere in Bugzilla::CGI, because
 # it uses Template, and that causes various dependency loops.
-if (Param("shutdownhtml") 
+if (!$^C
+    && Param("shutdownhtml") 
     && lsearch(SHUTDOWNHTML_EXEMPT, basename($0)) == -1) 
 {
     # Allow non-cgi scripts to exit silently (without displaying any