From de40f3ad56b99b6128e8d9d207f5c5304ae97393 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 24 Mar 2021 19:04:51 +0100 Subject: Fix TT-RSS import (#3553) --- app/Services/ImportService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Services/ImportService.php') diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 973cd7825..635613475 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -67,8 +67,8 @@ class FreshRSS_Import_Service { //Sort with categories first usort($opml_elements, function ($a, $b) { return strcmp( - (isset($a['xmlUrl']) ? 'Z' : 'A') . $a['text'], - (isset($b['xmlUrl']) ? 'Z' : 'A') . $b['text']); + (isset($a['xmlUrl']) ? 'Z' : 'A') . (isset($a['text']) ? $a['text'] : ''), + (isset($b['xmlUrl']) ? 'Z' : 'A') . (isset($b['text']) ? $b['text'] : '')); }); foreach ($opml_elements as $elt) { @@ -86,7 +86,7 @@ class FreshRSS_Import_Service { } else { $ok = false; } - } else { + } elseif (!empty($elt['text'])) { // No xmlUrl? It should be a category! $limit_reached = ($nb_cats >= $limits['max_categories']); if (!FreshRSS_Context::$isCli && $limit_reached) { -- cgit v1.2.3