Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 36435
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: zagap [...] users.sourceforge.net
Cc: zahatski [...] gmail.com
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



CC: zahatski [...] gmail.com
Subject: [PATCH] Use of uninitialized value in split in CGI.pm in Accept()
Very minor annoyance: when calling Accept() without args I get the follow warning when the use CGI.pm from shell: Use of uninitialized value in split This is because Accept() doesn't check that the $self->http('accept') return defined result before split. This is a quick patch: --- /usr/local/lib/perl5/site_perl/5.8.8/CGI.pm 2008-04-23 17:08:23.000000000 +0400 +++ CGI.pm 2008-06-04 15:58:15.000000000 +0400 @@ -2942,7 +2942,7 @@ my($self,$search) = self_or_CGI(@_); my(%prefs,$type,$pref,$pat); - my(@accept) = split(',',$self->http('accept')); + my(@accept) = defined $self->http('accept') ? split(',',$self->http('accept')) : (); foreach (@accept) { ($pref) = /q=(\d\.\d+|\d+)/;
Will be fixed in version 3.38.