Fixed Passing param "_" as an array causes an error


Active member

Edit: On a side note, the autolinker doesn't like underscores.
Similar errors occur in many places where an array isn't expected and wouldn't happen under normal use.

ErrorException: ltrim() expects parameter 1 to be string, array given - library/XenForo/Router.php:141
#0 [internal function]: XenForo_Application::handlePhpError(2, 'ltrim() expects...', '/var/www/xenfor...', 141, Array)
#1 /var/www/xenforo.deb.vm/library/XenForo/Router.php(141): ltrim(Array, '/')
#2 /var/www/xenforo.deb.vm/library/XenForo/Router.php(47): XenForo_Router->getRoutePath(Object(Zend_Controller_Request_Http))
#3 /var/www/xenforo.deb.vm/library/XenForo/Dependencies/Public.php(145): XenForo_Router->match(Object(Zend_Controller_Request_Http))
#4 /var/www/xenforo.deb.vm/library/XenForo/FrontController.php(264): XenForo_Dependencies_Public->route(Object(Zend_Controller_Request_Http))
#5 /var/www/xenforo.deb.vm/library/XenForo/FrontController.php(128): XenForo_FrontController->route()
#6 /var/www/xenforo.deb.vm/index.php(13): XenForo_FrontController->run()
#7 {main}
array(3) {
  ["url"] => string(44) "http://xenforo.deb.vm/index.php?_[]=anything"
  ["_GET"] => array(1) {
  ["_"] => array(1) {
  [0] => string(8) "anything"
  ["_POST"] => array(0) {
Last edited:


XenForo developer
Staff member
Fixed for 1.2 and (a potential) 1.1.6.

If you have specific other places, let us know. It should only come up in a few places where we aren't using our input filtering system (which should handle it if it isn't).


Active member
Seems the fix you applied also fixed the input filter itself as strval would previously error when passing things like _xfResponseType and in cookies xf_session as an array.