Recep Baltaş
Well-known member
I'm on the wagon too. 2.2.11 is too far. Can we have a quicker fix please?
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 hunk to theactionResults
function before the$page = $this->filterPage();
line:
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)
src/XF/Pub/Controller/Search.php
if (!is_object($search)) {
return $this->message(\XF::phrase('no_results_found'));
}
I'll second that. I suspect the devs will offer a patch soon.I'm on the wagon too. 2.2.11 is too far. Can we have a quicker fix please?
diff - Wikipedia
en.m.wikipedia.org
TL;DR
src/XF/Pub/Controller/Search.php
Insert
after line 149.PHP:if (!is_object($search)) { return $this->message(\XF::phrase('no_results_found')); }
diff - Wikipedia
en.m.wikipedia.org
TL;DR
src/XF/Pub/Controller/Search.php
Insert
after line 149.PHP:if (!is_object($search)) { return $this->message(\XF::phrase('no_results_found')); }
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.11).
Change log:
There may be a delay before changes are rolled out to the XenForo Community.
Apply this simple fix, and the error logs will stop. Until there's a patrch, it's the best we can do.I've got 72 PAGES of these sodding errors now. XF really should release a patch for this asap. How did this get through testing?
Thanks, I might just try that. Just had a look and you know those 72 pages of errors? It's now sitting at 934! And that's after clearing the 72 at the time I posted.Apply this simple fix, and the error logs will stop. Until there's a patrch, it's the best we can do.
![]()
Fixed - [E_WARNING] Attempt to read property "result_count" on null
I'm on the wagon too. 2.2.11 is too far. Can we have a quicker fix please?xenforo.com
Cheers,
Andre
Thanks, I might just try that. Just had a look and you know those 72 pages of errors? It's now sitting at 934! And that's after clearing the 72 at the time I posted.
View attachment 270970
@creativeforge I'm scared to run that health checker now...
I just had to dive in and install the damned update immediately, didn't I?
Yeah, I could try to roll it back from my backup, but that might just cause more problems turning an inconvenience into a crisis if the site drops out of the sky. I'll see about applying that temp fix. It's not likely to screw up further updates, is it?
@Pixel Princess @Arantor Please facepalm for me.
Traitor - you must share the pain!!I even waited before upgrading as there is always something, count me in on this one! Ugh!
We use essential cookies to make this site work, and optional cookies to enhance your experience.