Skip to content
Snippets Groups Projects
Commit 3a9fafe1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2691741 by Lendude: Remove leftover isset() in ViewExecutable

parent 0db5b138
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
...@@ -1896,10 +1896,6 @@ public function getUrl($args = NULL, $display_id = NULL) { ...@@ -1896,10 +1896,6 @@ public function getUrl($args = NULL, $display_id = NULL) {
return $this->override_url; return $this->override_url;
} }
if (!isset($path)) {
$path = $this->getPath();
}
$display_handler = $this->displayHandlers->get($display_id ?: $this->current_display)->getRoutedDisplay(); $display_handler = $this->displayHandlers->get($display_id ?: $this->current_display)->getRoutedDisplay();
if (!$display_handler instanceof DisplayRouterInterface) { if (!$display_handler instanceof DisplayRouterInterface) {
throw new \InvalidArgumentException('You cannot create a URL to a display without routes.'); throw new \InvalidArgumentException('You cannot create a URL to a display without routes.');
...@@ -1919,6 +1915,9 @@ public function getUrl($args = NULL, $display_id = NULL) { ...@@ -1919,6 +1915,9 @@ public function getUrl($args = NULL, $display_id = NULL) {
} }
} }
} }
$path = $this->getPath();
// Don't bother working if there's nothing to do: // Don't bother working if there's nothing to do:
if (empty($path) || (empty($args) && strpos($path, '%') === FALSE)) { if (empty($path) || (empty($args) && strpos($path, '%') === FALSE)) {
return $display_handler->getUrlInfo(); return $display_handler->getUrlInfo();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment