Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2017 10:54:16 +0000 (UTC)
From:      Wolfram Schneider <wosch@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r50931 - head/en_US.ISO8859-1/htdocs/ports
Message-ID:  <201709261054.v8QAsG8j098242@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wosch
Date: Tue Sep 26 10:54:16 2017
New Revision: 50931
URL: https://svnweb.freebsd.org/changeset/doc/50931

Log:
  check for undefined input from ports database
  
  PR: 222615

Modified:
  head/en_US.ISO8859-1/htdocs/ports/portindex

Modified: head/en_US.ISO8859-1/htdocs/ports/portindex
==============================================================================
--- head/en_US.ISO8859-1/htdocs/ports/portindex	Tue Sep 26 10:35:41 2017	(r50930)
+++ head/en_US.ISO8859-1/htdocs/ports/portindex	Tue Sep 26 10:54:16 2017	(r50931)
@@ -285,7 +285,13 @@ EOF
 	print $moutf "<h3>",$category_groups{$cg},"</h3>\n";
 	print $moutf "<ul>\n";
 	foreach my $key (sort(keys(%stats))) {
+	    if (!defined $category_description{$key}{group}) {
+		warn "Warning: no category_description/group for $key, ignore\n";
+		next;
+	    }
+
 	    next if ($category_description{$key}{group} ne $cg);
+
 	    # For the master file...
 	    print $moutf 
 		"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709261054.v8QAsG8j098242>