Bug 172740 - "use of uninitialized variable" warnings. Patch by gerv; r=bbaetz.

git-svn-id: svn://10.0.0.236/trunk@131299 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gerv%gerv.net
2002-10-07 06:44:07 +00:00
parent 6d2621b192
commit 840cf313cb
2 changed files with 2 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ else {
}
# Hack to support legacy applications that think the RDF ctype is at format=rdf.
if ($::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) {
if ($::FORM{'format'} && $::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) {
$::FORM{'ctype'} = "rdf";
delete($::FORM{'format'});
}

View File

@@ -1631,6 +1631,7 @@ sub GetFormat {
my ($template, $format, $ctype) = @_;
$ctype ||= "html";
$format ||= "";
# Security - allow letters and a hyphen only
$ctype =~ s/[^a-zA-Z\-]//g;