From f40a911a0ae6ba9db2faaf8372e229f80998e151 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Tue, 9 Jan 2024 14:24:22 +0100 Subject: [PATCH] Fix error in items sorting when serial isssue number is null --- module/VuFind/src/VuFind/ILS/Driver/KohaRest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php index e925b0e72d8..8b4ee9d08f4 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php @@ -2142,7 +2142,7 @@ protected function statusSortFunction($a, $b) $result = $this->getSorter()->compare($a['location'], $b['location']); if (0 === $result && $this->sortItemsBySerialIssue) { - $result = strnatcmp($a['number'], $b['number']); + $result = strnatcmp($a['number'] ?? '', $b['number'] ?? ''); } if (0 === $result) {