diff --git a/src/Style/Sort/Sort.php b/src/Style/Sort/Sort.php index 1f5c297a..93932a6e 100644 --- a/src/Style/Sort/Sort.php +++ b/src/Style/Sort/Sort.php @@ -123,7 +123,12 @@ private function performSort($keyNumber, $dataToSort) } elseif ($variable === "citation-number") { $sortKey = $citationNumber + 1; } else { - $sortKey = mb_strtolower(strip_tags($dataItem->{$variable})); + if (!isset($dataItem->{$variable})) { + $sortKey = "status"; + } + else { + $sortKey = mb_strtolower(strip_tags($dataItem->{$variable})); + } } $groupedItems[$sortKey][] = $dataItem; }