Skip to content

Commit

Permalink
DDST-593: Hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
bibliophileaxe committed Oct 18, 2024
1 parent 580d5ef commit bbadd46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugin/Block/DisplayCitationsBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Drupal\islandora_citations\IslandoraCitationsHelper;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
Expand Down Expand Up @@ -177,7 +178,7 @@ public function blockSubmit($form, FormStateInterface $form_state) {
public function getCacheTags() {
// Retrieve the node ID.
$node = $this->routeMatch->getParameter('node');
$node_id = $node ? $node->id() : NULL;
$node_id = $node instanceof NodeInterface ? $node->id() : NULL;

// Return cache tags.
if ($node_id) {
Expand Down

0 comments on commit bbadd46

Please sign in to comment.