]> granicus.if.org Git - apache/commitdiff
Bugfix: If there's only one valid context, this is a scalar, not an arrayref.
authorRich Bowen <rbowen@apache.org>
Sat, 27 Nov 2010 02:27:17 +0000 (02:27 +0000)
committerRich Bowen <rbowen@apache.org>
Sat, 27 Nov 2010 02:27:17 +0000 (02:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039597 13f79535-47bb-0310-9956-ffa450edef68

docs/review_translations.pl

index 4c8467fef75efffb8853c8aacf2915a4624c1abd..7b6c0615544884d18a99e3033ed1e646d5351229 100755 (executable)
@@ -69,6 +69,13 @@ sub directive_doc {
         $eng_xml->{directivesynopsis}->{$d}->{description} .
         "</description>\n";
     print "<contextlist>";
+
+    # If there's only one context, this is a scalar, not an arrayref.
+    if ( !ref( $eng_xml->{directivesynopsis}->{$d}->{contextlist}->{context}) ) {
+        $eng_xml->{directivesynopsis}->{$d}->{contextlist}->{context} 
+            = [ $eng_xml->{directivesynopsis}->{$d}->{contextlist}->{context} ]
+    }
+
     foreach my $c ( @{ $eng_xml->{directivesynopsis}->{$d}->{contextlist}->{context} } ) {
         print "<context>".$c."</context>";
     }