Duplicate Lots of errors in the log and forum down v2.3.2

Sal Collaziano

Well-known member
Affected version
2.3.2
I noticed my forum was down and logged into the admincp. Just doing that brought the forum back up - but there are a lot of errors showing up in the log. Any idea what's causing the issue?

TypeError: XF\Util\Str::strtolower(): Argument #1 ($string) must be of type string, null given, called in /home/forum/public_html/src/XF/Criteria/AbstractCriteria.php on line 206 src/XF/Util/Str.php:210 <br><br>Generated by: Unknown account Aug 27, 2024 at 4:15 PM.

Stack trace


0 src/XF/Criteria/AbstractCriteria.php(206): XF\Util\Str::strtolower(NULL)​


1 src/XF/Criteria/UserCriteria.php(101): XF\Criteria\AbstractCriteria->findNeedle('riAMCJavelin196...', NULL)​


2 src/XF/Criteria/AbstractCriteria.php(67): XF\Criteria\UserCriteria->_matchEmailSearch(Array, Object(XF\Entity\User))​


3 src/XF/NoticeList.php(99): XF\Criteria\AbstractCriteria->isMatched(Object(XF\Entity\User))​


4 src/XF/Pub/App.php(658): XF\NoticeList->addConditionalNotice(1, 'block', '<br /><br /><br...', Array)​


5 src/XF/Pub/App.php(593): XF\Pub\App->getNoticeList(Array)​


6 src/XF/App.php(2560): XF\Pub\App->renderPageHtml('​


...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))


7 src/XF/Mvc/Dispatcher.php(414): XF\App->renderPage('​


...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))


8 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')​


9 src/XF/App.php(2813): XF\Mvc\Dispatcher->run()​


10 src/XF.php(802): XF\App->run()​


11 index.php(23): XF::runApp('XF\Pub\App')​


12 {main}​


Request state


array(4) {
["url"] => string(41) "/threads/topic-title-was-here.320/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
It looks like you're checking for a matching email address in a notice. We may want to make some changes here but the quickest workaround for now is to make sure the criteria also checks for "User is logged in".

Checking an email address for a guest user is pointless because they don't have one, so making sure the check only happens for logged in users is the way to workaround this.
 
It looks like you're checking for a matching email address in a notice. We may want to make some changes here but the quickest workaround for now is to make sure the criteria also checks for "User is logged in".

Checking an email address for a guest user is pointless because they don't have one, so making sure the check only happens for logged in users is the way to workaround this.
Thank you, Chris. I have made this change and will report back if there are any further errors...
 
Duplicate:

 
Back
Top Bottom