diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index d7981f9..6a552ba 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -2145,7 +2145,7 @@ public function setItemOption($display_id, $type, $id, $option, $value) { * TRUE if the admin links should be shown. */ public function setShowAdminLinks($show_admin_links) { - $this->showAdminLinks = $show_admin_links; + $this->showAdminLinks = (bool) $show_admin_links; } /** diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 203e8a0..7d99ef0 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -566,7 +566,7 @@ function views_contextual_links_view_alter(&$element, $items) { function views_add_contextual_links(&$render_element, $location, ViewExecutable $view, $display_id) { // Do not do anything if the view is configured to hide its administrative // links. - if (!empty($view->getShowAdminLinks())) { + if ($view->getShowAdminLinks()) { // Also do not do anything if the display plugin has not defined any // contextual links that are intended to be displayed in the requested // location.