No Code Attached Yet
avatar MilanKerslager
MilanKerslager
6 Mar 2026

When an array is passed manually via the GET method, the Joomla engine throws an error 500.
The engine should check input more strictly to be able to survive strict typechecking in PHP 8.x

The traceback below went through error.php, but the same problem is that when somepath is correct, it just throws a traceback by another Route::_() call in my template.

TypeError

in /libraries/src/Component/Router/Rules/PreprocessRules.php (line 106)
        $key        = $this->view->key;
        $parent_key = $this->view->parent_key;
        // We have to have at least the ID or something to repair
        if (!isset($query[$key]) || (strpos($query[$key], ':') && isset($query[$parent_key]))) {
            return;
        }
        $dbquery = $this->getDatabase()->createQuery();
        $id      = (int) $query[$key];

TypeError
strpos(): Argument #1 ($haystack) must be of type string, array given

Traceback:

CRITICAL        37.188.166.9    error   Uncaught Throwable of type InvalidArgumentException thrown with message "**Kategorie nebyla nalezena**". Stack trace: #0 [ROOT]/components/com_content/src/View/Category/HtmlView.php(83): Joomla\CMS\MVC\View\CategoryView->commonCategoryDisplay()
#1 [ROOT]/libraries/src/MVC/Controller/BaseController.php(697): Joomla\Component\Content\Site\View\Category\HtmlView->display()
#2 [ROOT]/components/com_content/src/Controller/DisplayController.php(123): Joomla\CMS\MVC\Controller\BaseController->display()
#3 [ROOT]/libraries/src/MVC/Controller/BaseController.php(730): Joomla\Component\Content\Site\Controller\DisplayController->display()
#4 [ROOT]/libraries/src/Dispatcher/ComponentDispatcher.php(143): Joomla\CMS\MVC\Controller\BaseController->execute()
#5 [ROOT]/components/com_content/src/Dispatcher/Dispatcher.php(56): Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
#6 [ROOT]/libraries/src/Component/ComponentHelper.php(361): Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch()
#7 [ROOT]/libraries/src/Application/SiteApplication.php(217): Joomla\CMS\Component\ComponentHelper::renderComponent()
#8 [ROOT]/libraries/src/Application/SiteApplication.php(271): Joomla\CMS\Application\SiteApplication->dispatch()
#9 [ROOT]/libraries/src/Application/CMSApplication.php(320): Joomla\CMS\Application\SiteApplication->doExecute()
#10 [ROOT]/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#11 [ROOT]/index.php(51): require_once('...')
#12 {main}
avatar MilanKerslager MilanKerslager - open - 6 Mar 2026
avatar MilanKerslager MilanKerslager - change - 6 Mar 2026
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Mar 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Mar 2026
avatar MilanKerslager
MilanKerslager - comment - 6 Mar 2026

Sorry, I omitted the URL that makes it happen:

https://SITENAME/somepath?id[]=1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47318.

avatar Fedik
Fedik - comment - 7 Mar 2026

Using key (id in this case) as array will cause a lot more issues.
It is expected to get an error.

Add a Comment

Login with GitHub to post a comment