Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Check that $node is properly populated before continuing
Browse files Browse the repository at this point in the history
Some routes that have a 'node' parameter don't necessarily
hydrate the parameter, e.g. /node/$nid/revisions/$vid/revert
  • Loading branch information
anthony-malkoun committed Jan 6, 2021
1 parent 3c9f497 commit 90894c2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ protected function getCurrentNode() : ?NodeInterface {
$node = NULL;
}
}

if (!($node instanceof NodeInterface)) {
$node = NULL;
}

$this->currentNode = $node;

return $this->currentNode;
Expand Down

0 comments on commit 90894c2

Please sign in to comment.