Skip to content
Snippets Groups Projects
Commit 81b05c67 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Don't report duplicate entries - it is an OK thing to do.
parent 6db29f35
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
......@@ -4,10 +4,7 @@
function menu($path, $title, $callback = NULL, $help = NULL, $weight = 0, $hidden = 0) {
global $_gmenu;
if (isset($_gmenu[$path])) {
trigger_error("trying to add '$path' which already exists");
}
else {
if (empty($_gmenu[$path])) {
// add the menu to the flat list of menu items:
$_gmenu[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden, "children" => array());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment