diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php index 4bfa65e..cc34627 100644 --- a/core/lib/Drupal/Core/Url.php +++ b/core/lib/Drupal/Core/Url.php @@ -317,10 +317,10 @@ public function setAbsolute($absolute = TRUE) { */ public function toString() { if ($this->isExternal()) { - return $this->urlGenerator()->generateFromPath($this->path, $this->options); + return $this->urlGenerator()->generateFromPath($this->getPath(), $this->getOptions()); } - return $this->urlGenerator()->generateFromRoute($this->routeName, $this->routeParameters, $this->options); + return $this->urlGenerator()->generateFromRoute($this->getRouteName(), $this->getRouteParameters(), $this->getOptions()); } /** @@ -332,15 +332,15 @@ public function toString() { public function toArray() { if ($this->external) { return array( - 'path' => $this->path, - 'options' => $this->options, + 'path' => $this->getPath(), + 'options' => $this->getOptions(), ); } else { return array( - 'route_name' => $this->routeName, - 'route_parameters' => $this->routeParameters, - 'options' => $this->options, + 'route_name' => $this->getRouteName(), + 'route_parameters' => $this->getRouteParameters(), + 'options' => $this->getOptions(), ); } } @@ -354,15 +354,15 @@ public function toArray() { public function toRenderArray() { if ($this->external) { return array( - '#href' => $this->path, - '#options' => $this->options, + '#href' => $this->getPath(), + '#options' => $this->getOptions(), ); } else { return array( - '#route_name' => $this->routeName, - '#route_parameters' => $this->routeParameters, - '#options' => $this->options, + '#route_name' => $this->getRouteName(), + '#route_parameters' => $this->getRouteParameters(), + '#options' => $this->getOptions(), ); } } diff --git a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldWidget/LinkWidget.php index effd3e6..f782080 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldWidget/LinkWidget.php @@ -224,6 +224,9 @@ public function massageFormValues(array $values, array $form, array &$form_state catch (MatchingRouteNotFoundException $e) { // Nothing to do here, validateUrl() emits form validation errors. } + catch (ParamNotConvertedException $e) { + // Nothing to do here, validateUrl() emits form validation errors. + } } } return $values;