diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php index ed5b0dc..cb139c2 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php @@ -610,8 +610,7 @@ public function setRouterPath($router_path) { * {@inheritdoc} */ public function getOptions() { - $options = $this->get('options')->getValue(); - return $options[0]; + return $this->get('options')->offsetGet(0)->getValue(); } /** @@ -784,8 +783,7 @@ public function setAccess($access) { * {@inheritdoc} */ public function getRouteParams() { - $route_params = $this->get('route_parameters')->getValue(); - return $route_params[0]; + return $this->get('route_parameters')->offsetGet(0)->getValue();; } /**