Skip to content

Commit

Permalink
Item14179: Don't crash on alpha versions of CGI
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Sep 7, 2016
1 parent 4b97bd2 commit 5fad4c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/lib/Foswiki/Configure/UIs/CGISetup.pm
Expand Up @@ -80,6 +80,8 @@ HERE
}

my $cgiver = $CGI::VERSION;
$cgiver =~ s/_.*$//;

if ( "$cgiver" =~ m/^(2\.89|3\.37|3\.43|3\.47)$/ ) {
$contents .= $this->setting( '', $this->WARN( <<HERE ) );
You are using a version of \$CGI that is known to have issues with Foswiki.
Expand All @@ -91,7 +93,7 @@ HERE
# CGI.pm version, on some platforms - actually need CGI 2.93 for
# mod_perl 2.0 and CGI 2.90 for Cygwin Perl 5.8.0. See
# http://perl.apache.org/products/apache-modules.html#Porting_CPAN_modules_to_mod_perl_2_0_Status
if ( $CGI::VERSION < 2.93 ) {
if ( $cgiver < 2.93 ) {
if ( $Config::Config{osname} eq 'cygwin' && $] >= 5.008 ) {

# Recommend CGI.pm upgrade if using Cygwin Perl 5.8.0
Expand Down

0 comments on commit 5fad4c8

Please sign in to comment.