Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Jul 27, 2023
1 parent c4e0aa8 commit b1a43df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DCA/PageDCA.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ public function getLinkedPages(): string
//get page details and sorting info
$this->collectPageDetails($relations);
usort($relations, static function ($itemA, $itemB) {
return static::$pageCache[$itemA]['rootIdSorting'] < static::$pageCache[$itemB]['rootIdSorting'] ? -1 : 1;
$sortingA = static::$pageCache[$itemA]['rootIdSorting'] ?? -1;
$sortingB = static::$pageCache[$itemB]['rootIdSorting'] ?? -1;

return $sortingA < $sortingB ? -1 : 1;
});
//build return array
$newValues = [];
Expand Down

0 comments on commit b1a43df

Please sign in to comment.