]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Silence Perl warning
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 13 Apr 2020 23:54:09 +0000 (19:54 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 13 Apr 2020 23:57:40 +0000 (19:57 -0400)
Now that warnings are enabled across the board, this code that tries to
print an undef variable emits one.  Silently printing the empty string
achieves the previous behavior.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Discussion: https://postgr.es/m/E1jO1VT-0008Qk-TM@gemulon.postgresql.org

doc/src/sgml/mk_feature_tables.pl

index ee158cb1969fa7637b169eab6252fa4e76d1d943..a9dfebfbb311a686579961efb3643fe0dc4b2d35 100644 (file)
@@ -54,7 +54,9 @@ while (<$feat>)
        {
                print "  <entry>$feature_id</entry>\n";
        }
-       print "  <entry>" . $feature_packages{$feature_id} . "</entry>\n";
+       print "  <entry>",
+                 defined($feature_packages{$feature_id}) ? $feature_packages{$feature_id} : "",
+                 "</entry>\n";
        if ($subfeature_id)
        {
                print "  <entry>$subfeature_name</entry>\n";