aboutsummaryrefslogtreecommitdiff
path: root/app/Services/ImportService.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-24 19:04:51 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-24 19:04:51 +0100
commitde40f3ad56b99b6128e8d9d207f5c5304ae97393 (patch)
tree7755eac081f32ba87445ec82a2a740ea4a1865eb /app/Services/ImportService.php
parent06fa51448336d8ad95d70e7cd96e4c3f4e30907a (diff)
Fix TT-RSS import (#3553)
Diffstat (limited to 'app/Services/ImportService.php')
-rw-r--r--app/Services/ImportService.php6
1 files changed, 3 insertions, 3 deletions
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) {