chiark / gitweb /
Fix error with more recent perl
[modbot-mtm.git] / webstump / scripts / webstump.pl
index 97b09ed557d195f0cd4a71447e60ddae3c48a02d..dfe7dc38e0b08fd139718d2824202e0687f0cee9 100755 (executable)
@@ -9,9 +9,14 @@ if( !($0 =~ /\/scripts\/webstump\.pl$/) ) {
   die "This script can only be called with full path name!!!";
 }
 
+umask 007;
+
 $webstump_home = $0;
 $webstump_home =~ s/\/scripts\/webstump\.pl$//;
 
+my $logfile= "$webstump_home/../errs";
+open STDERR, ">> $logfile" or die "$logfile $!";
+
 $webstump_home =~ /(^.*$)/;
 $webstump_home = $1;
 
@@ -32,7 +37,7 @@ $html_mode = "yes";
 
 $command = "";
 
-if( defined %request ) {
+if(  %request ) {
   &disinfect_request;
   $command = $request{'action'} if( defined $request{'action'} );
 }