Skip to content

Commit

Permalink
fix: CustomPostTypesFromApi::modifyBreadCrumbItems throws when $pageD…
Browse files Browse the repository at this point in the history
…ata is null (#725)
  • Loading branch information
thorbrink authored Oct 24, 2023
1 parent 398ca33 commit 001c651
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Content/CustomPostTypesFromApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public function modifyPostTypeLink(string $postLink, WP_Post $post)
return $postLink;
}

public function modifyBreadcrumbsItems(array $pageData, $queriedObject, $queriedObjectData): array
public function modifyBreadcrumbsItems(?array $pageData, $queriedObject, $queriedObjectData): array
{
if (!is_a($queriedObject, 'WP_Post')) {
if (is_null($pageData) || !is_a($queriedObject, 'WP_Post')) {
return $pageData;
}

Expand Down

0 comments on commit 001c651

Please sign in to comment.