diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 6492b10..346a8b9 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -531,7 +531,22 @@ function _menu_load_objects(&$item, &$map) { $args[$i] = &$map; } if (is_int($arg)) { - $args[$i] = isset($path_map[$arg]) ? $path_map[$arg] : ''; + // If we loaded the specified $arg index in already, supply the + // loaded argument. This is the case when e.g. two dynamic + // placeholders appear within a single router path, and the + // 'load arguments' specify the integer index of the first + // argument, in order to pass the loaded argument to the second + // argument loader. + if (isset($map[$arg])) { + $args[$i] = $map[$arg]; + } + // Otherwise, supply the string argument, if any. + elseif (isset($path_map[$arg])) { + $args[$i] = $path_map[$arg]; + } + else { + $args[$i] = ''; + } } } array_unshift($args, $value);