Cannot access offset of type string on string src/XF/Mvc/Renderer/Html.php:167

Alpha1

Well-known member
I'm getting tens of thousands of these. Is this a bug?

Cannot access offset of type string on string src/XF/Mvc/Renderer/Html.php:167
Stack trace

#0 src/XF/Mvc/Dispatcher.php(415): XF\Mvc\Renderer\Html->postFilter('...', Object(XF\Mvc\Reply\View))
#1 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#2 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#3 src/XF.php(806): XF\App->run()
#4 index.php(23): XF::runApp('XF\\Pub\\App')
#5 {main}

Request state

array(4) {
["url"] => string(52) "/media/opinions-appreciated.61274/"
["referrer"] => string(45) "https://www.google.com/search?hl=en&q=testing"
["_GET"] => array(1) {
["/media/opinions-appreciated_61274/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
I'm getting tens of thousands of these. Is this a bug?

Cannot access offset of type string on string src/XF/Mvc/Renderer/Html.php:167
Stack trace

#0 src/XF/Mvc/Dispatcher.php(415): XF\Mvc\Renderer\Html->postFilter('...', Object(XF\Mvc\Reply\View))
#1 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#2 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#3 src/XF.php(806): XF\App->run()
#4 index.php(23): XF::runApp('XF\\Pub\\App')
#5 {main}

Request state

array(4) {
["url"] => string(52) "/media/opinions-appreciated.61274/"
["referrer"] => string(45) "https://www.google.com/search?hl=en&q=testing"
["_GET"] => array(1) {
["/media/opinions-appreciated_61274/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
That's likely going to be either a template problem or some addon conflicting somewhere.
I've seen this before, but I don't remember which specific cause it was traced to.
As we couldn't replicate the issue with addons disabled, it wasn't an XF issue but somewhere in an addon.

You can confirm the case in a dev environment with addons disabled to see if the error goes away.
It's not a super helpful error message because it at a glance, didn't look like it would be an addon... but yeah...
I'd try disabling addons first to narrow it down.
 
Similar ?

 
The error message "Cannot access offset of type string on string" in src/XF/Mvc/Renderer/Html.php indicates that your XenForo installation is attempting to access a string as if it were an array using an offset (e.g., $variable['key']), but the variable is actually a string. This often occurs after a PHP version upgrade, particularly from PHP 7.x to PHP 8.x, as PHP 8 introduced stricter type checking.

Does Google Gemini help ?
 
Back
Top Bottom