From e6884a934c9370730f23fe8b608deb65b66104a7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 19 Sep 2020 16:47:00 +0000 Subject: [PATCH] Fix Notice: "Undefined variable: r" --- src/Module/Search/Index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index debaec7301..80acd74b94 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -161,11 +161,10 @@ class Index extends BaseSearch if (!empty($uriids)) { $params = ['order' => ['id' => true], 'group_by' => ['uri-id']]; - $items = Item::selectForUser(local_user(), [], ['uri-id' => $uriids], $params); - $r = Item::inArray($items); + $items = Item::inArray(Item::selectForUser(local_user(), [], ['uri-id' => $uriids], $params)); } - if (!DBA::isResult($r)) { + if (empty($items)) { notice(DI::l10n()->t('No results.')); return $o; } @@ -182,7 +181,7 @@ class Index extends BaseSearch Logger::info('Start Conversation.', ['q' => $search]); - $o .= conversation(DI::app(), $r, 'search', false, false, 'commented', local_user()); + $o .= conversation(DI::app(), $items, 'search', false, false, 'commented', local_user()); $o .= $pager->renderMinimal($count);