diff --git a/core/modules/views/src/Plugin/Block/ViewsBlock.php b/core/modules/views/src/Plugin/Block/ViewsBlock.php index 6578cc6..220b33e 100644 --- a/core/modules/views/src/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/src/Plugin/Block/ViewsBlock.php @@ -32,13 +32,12 @@ public function build() { // argument is provided. $args[$argument_name] = $argument->options['default_action'] == 'ignore' ? 'all' : NULL; - if (!empty($this->context[$argument_name])) { - if ($value = $this->context[$argument_name]->getContextValue()) { - if ($value instanceof EntityInterface) { - $value = $value->id(); - } - $args[$argument_name] = $value; + if ($this->getContext($argument_name)->hasContextValue()) { + $value = $this->getContext($argument_name)->getContextValue(); + if ($value instanceof EntityInterface) { + $value = $value->id(); } + $args[$argument_name] = $value; } }