diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php index 6650e2aab5..1023feeb0b 100644 --- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php @@ -197,12 +197,18 @@ protected function getRoute($view_id, $display_id) { } $access_plugin->alterRouteDefinition($route); + $arguments = $this->getOption('arguments'); + // Some views return null arguments rather than [] + if ($arguments === NULL) { + $arguments = []; + } + $validate_arguments = []; $idx = -1; // Collect arguments which have validation and have a fail behavior of // "page not found" or "access denied". - foreach ($this->getOption('arguments') as $argument) { + foreach ($arguments as $argument) { if (!empty($argument['specify_validation']) && !empty($argument['validate']) && in_array($argument['validate']['fail'], ['not found', 'access denied']) ) { $validate_arguments[] = [