Skip to content

Commit b30312c

Browse files
committed
BUGFIX: Do not fail when no configuration is set
1 parent 61a2f97 commit b30312c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/NodeSignalInterceptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class NodeSignalInterceptor
3838
*/
3939
public function nodeAdded(NodeInterface $node)
4040
{
41-
if (!array_key_exists($node->getNodeType()->getName(), $this->sortingInstructions)) {
41+
if (!array_key_exists($node->getNodeType()->getName(), $this->sortingInstructions ?? [])) {
4242
return;
4343
}
4444

@@ -61,7 +61,7 @@ public function nodeUpdated(NodeInterface $node)
6161
return;
6262
}
6363

64-
if (array_key_exists($node->getNodeType()->getName(), $this->sortingInstructions)) {
64+
if (array_key_exists($node->getNodeType()->getName(), $this->sortingInstructions ?? [])) {
6565
$this->createArchivist()->organizeNode($node, $this->sortingInstructions[$node->getNodeType()->getName()]);
6666
}
6767
}

0 commit comments

Comments
 (0)