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

#73676 by keve, fix an undefined index.

parent 46295c43
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
...@@ -178,7 +178,7 @@ function menu_form_alter($form_id, &$form) { ...@@ -178,7 +178,7 @@ function menu_form_alter($form_id, &$form) {
$item = array(); $item = array();
if ($edit['nid'] > 0) { if ($edit['nid'] > 0) {
$item = db_fetch_array(db_query("SELECT * FROM {menu} WHERE path = 'node/%d'", $edit['nid'])); $item = db_fetch_array(db_query("SELECT * FROM {menu} WHERE path = 'node/%d'", $edit['nid']));
if (is_array($edit['menu'])) { if (isset($edit['menu']) && is_array($edit['menu'])) {
$item = !is_array($item) ? $edit['menu'] : (($_POST['op'] == t('Preview')) ? array_merge($item, $edit['menu']) : array_merge($edit['menu'], $item)); $item = !is_array($item) ? $edit['menu'] : (($_POST['op'] == t('Preview')) ? array_merge($item, $edit['menu']) : array_merge($edit['menu'], $item));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment