File: 03_no_warn_in_error_log.patch

package info (click to toggle)
drraw 2.2b2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,572 kB
  • sloc: perl: 4,183; sh: 31; makefile: 8
file content (22 lines) | stat: -rw-r--r-- 907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Author: Ludovic Rousseau <rousseau@debian.org>
Last-Update: 2015-05-25
Bug-Debian: https://bugs.debian.org/786752
Description: Suppress warnings filling up Apache error log
 Better solution as described at
 https://metacpan.org/pod/CGI#Fetching-the-value-or-values-of-a-single-named-parameter

 My proposed patch is to just ignore the warning.
 A better patch (untested) would be to solve the problem using
 "scalar param('foo')" instead of "param('foo')" as proposed in the URL above.

--- a/drraw.cgi
+++ b/drraw.cgi
@@ -55,6 +55,8 @@ my $config = "/etc/drraw/drraw.conf"; #
 # in tainted mode.
 $ENV{'PATH'} = '/bin:/usr/bin';
 
+$CGI::LIST_CONTEXT_WARN = 0;
+
 ###############################################################################
 ##   STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP   ##
 ##                                                                           ##