Skip to content

Commit

Permalink
Fix: fixed exception on create new blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Kuhn committed Nov 21, 2018
1 parent d0fdec7 commit 725cb93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/PostNodePreparationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected function addParentCategoryToPostNode(NodeInterface $node)
->get(0);

if ($parentCategory !== null) {
$categories = $node->getProperty('categories');
$categories = $node->getProperty('categories') ?? [];
if (array_search($parentCategory, $categories, true) === false) {
$categories[] = $parentCategory;
$node->setProperty('categories', $categories);
Expand Down

0 comments on commit 725cb93

Please sign in to comment.