Skip to content
Snippets Groups Projects
Commit 4fb76f68 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#67647 by fgm and nickl. Don't make a taxonomy option for vocabularies without terms.

parent 77354a34
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -565,8 +565,8 @@ function taxonomy_form_all($free_tags = 0) {
foreach ($vocabularies as $vid => $vocabulary) {
if ($vocabulary->tags && !$free_tags) { continue; }
$tree = taxonomy_get_tree($vid);
if ($tree && (count($tree) > 1)) {
$options[$vocabulary->name] = array();
if ($tree) {
foreach ($tree as $term) {
$options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment