Skip to content
Snippets Groups Projects
Commit d388033e authored by natrak's avatar natrak
Browse files

- Minor bug fix in node_links().

parent dc4a5bfc
Branches
Tags
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
......@@ -249,8 +249,8 @@ function node_links(&$links, &$node, $main = 0) {
if ($node->body) $_links[] = array("node.php?id=$node->nid", t("read more"));
if ($node->comment) $_links[] = array("node.php?id=$node->nid", format_plural(node_get_comments($node->nid), "comment", "comments"));
}
$links = array_merge($_links, $links);
return $links;
$links = ($links ? array_merge($_links, $links) : $_links);
return count($links) ? $links : 0;
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment