--- 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);
actionResults
function before the $page = $this->filterPage();
line:if (!is_object($search)) {
return $this->message(\XF::phrase('no_results_found'));
}
It's on the results page, the searches are stored and can be viewed back with a unique URL, and those don't seem to have a permissions check. The more intensive process of the search itself is already done at that point so I guess it doesn't need permission gating.what's ironic is that i have search disabled for guests, and i'm still seeing it....
There may be a delay before changes are rolled out to the XenForo Community.Fix a server error when guests tried to access non-existent search results
#0 src/XF/Pub/Controller/Search.php(153): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/var/www/vhosts...', 153, Array)
#1 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Search->actionResults(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'Results', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
array(4) {
["url"] => string(22) "/search/154476/?page=2"
["referrer"] => string(51) "https://balkanforum.info/search/member?user_id=6209"
["_GET"] => array(1) {
["page"] => string(1) "2"
}
["_POST"] => array(0) {
}
}
#0 src/XF/Pub/Controller/Search.php(153): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/var/www/vhosts...', 153, Array)
#1 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Search->actionResults(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'Results', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
array(4) {
["url"] => string(15) "/search/167217/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Not yet, see:Is it fixed or not? I'm a little bit confused
and 2.2.11 is not yet available.We are aiming to include any changes that have been made in a future XF release (2.2.11).
There are 1 missing files or files with unexpected contents. You should review these.
warning, so until an upgrade is release you may choose what's the lesser "evil" for you We use essential cookies to make this site work, and optional cookies to enhance your experience.