Yeah I rather have a daily file integrity warning until a fix is released than dozens of error log entries per minute..
So I applied the following diff as stop gap:
Diff:
--- src/XF/Pub/Controller/Search.orig.php 2022-07-14 09:15:02.888904630 +0200
+++ src/XF/Pub/Controller/Search.php 2022-07-14 09:14:47.017272442 +0200
@@ -143,12 +143,16 @@ class Search extends AbstractController
}
else if ($search && $search->search_query && $search->search_query !== $this->filter('q', 'str'))
{
return $this->notFound();
}
}
+ # [ TL: workaround regression of 2.2.10 producing many errors with guests searching ]
+ if (!is_object($search)) {
+ return $this->message(\XF::phrase('no_results_found'));
+ }
$page = $this->filterPage();
$perPage = $this->options()->searchResultsPerPage;
$this->assertValidPage($page, $perPage, $search->result_count, 'search', $search);
IOW, add the following three lines to the
actionResults
function before the
$page = $this->filterPage();
line in
src/XF/Pub/Controller/Search.php
:
PHP:
if (!is_object($search)) {
return $this->message(\XF::phrase('no_results_found'));
}
Stopped the error messages from piling up and didn't see any bad effect (albeit the actual fix is probably different)