We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 901f6ab + 84921e7 commit a6b6d01Copy full SHA for a6b6d01
Classes/Indexer/NodeIndexer.php
@@ -249,13 +249,17 @@ protected function findFulltextRoot(NodeInterface $node): ?NodeInterface
249
return null;
250
}
251
252
- $currentNode = $node->findParentNode();
253
- while ($currentNode !== null) {
254
- if (in_array($currentNode->getNodeType()->getName(), $this->fulltextRootNodeTypes, true)) {
255
- return $currentNode;
256
- }
+ try {
+ $currentNode = $node->findParentNode();
+ while ($currentNode !== null) {
+ if (in_array($currentNode->getNodeType()->getName(), $this->fulltextRootNodeTypes, true)) {
+ return $currentNode;
257
+ }
258
- $currentNode = $currentNode->findParentNode();
259
+ $currentNode = $currentNode->findParentNode();
260
261
+ } catch (NodeException $exception) {
262
+ return null;
263
264
265
0 commit comments