Skip to content

Commit

Permalink
BUGFIX: Only log when parent resolution fails
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Dec 10, 2020
1 parent 0953fba commit 3ebbd9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/ChangedNodesCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ public function resolveParentDocumentNode(NodeInterface $node): ?NodeInterface
/** @var NodeInterface $parent */
$parent = (new FlowQuery([$node]))->closest('[instanceof ' . self::NODETYPE_NEOS_DOCUMENT . ']')->get(0);

$this->logger->error(sprintf('The parent document for node %s could not be determined', (string)$node), LogEnvironment::fromMethodName(__METHOD__));

if (!$parent instanceof NodeInterface) {
$this->logger->error(sprintf('The parent document for node %s could not be determined', (string)$node), LogEnvironment::fromMethodName(__METHOD__));
return null;
}

Expand Down

0 comments on commit 3ebbd9f

Please sign in to comment.