diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php index 0281df5..839adf7 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php @@ -110,14 +110,7 @@ public function setRouteParams($route_parameters) { * {@inheritdoc} */ public function getUrl() { - if ($this->link[0]->isExternal() && !$this->link->isEmpty()) { - $url = Url::createFromPath($this->link->url); - $url->setOptions($this->link->options); - } - else { - $url = new Url($this->link->route_name, (array) $this->link->route_parameters, (array) $this->link->options); - } - return $url; + return new Url($this->link->route_name, (array) $this->link->route_parameters, (array) $this->link->options); } /** diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php index 0c84231..3e5b0c5 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php @@ -42,6 +42,7 @@ public function testShortcutLinkAdd() { // Create some paths to test. $test_cases = array( + array('path' => ''), array('path' => 'admin'), array('path' => 'admin/config/system/site-information'), array('path' => 'node/' . $this->node->id() . '/edit'),