Skip to content

Commit 725cb93

Browse files
author
Marvin Kuhn
authored
Fix: fixed exception on create new blog post
1 parent d0fdec7 commit 725cb93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/Service/PostNodePreparationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function addParentCategoryToPostNode(NodeInterface $node)
138138
->get(0);
139139

140140
if ($parentCategory !== null) {
141-
$categories = $node->getProperty('categories');
141+
$categories = $node->getProperty('categories') ?? [];
142142
if (array_search($parentCategory, $categories, true) === false) {
143143
$categories[] = $parentCategory;
144144
$node->setProperty('categories', $categories);

0 commit comments

Comments
 (0)