version 5.4.2
Add the 'format=%27' parameter to the URL of any existing article. For example index.php?option=com_content&view=article&id=111&format=%27
Joomla returns 404 and displays an error page from the current template
Joomla returns HTTP 500 and displays default error page .
The parameter 'format' will contain empty string after cleaning input parameters. It will be used for determination of the page type. Since it is empty, an instance of Joomla\CMS\Document will be created instead of its successor (HtmlDocument, JsonDocument, ...). The Document::$_type will not be set and it will be null by default. The exception will be raised on attempt to find a view for undefined (empty) page type. The ExceptionHandler::render will try to get a current output format by a call to Factory::$document->getType() at line 117, which will return null. At the next step $format will be pass to AbstractRenderer::getRenderer($format), which requires a parameter of string type only. The TypeError will be raised here.
This may be fixed quickly by changing the default value for Document::$_type from null to empty string. The method AbstractRenderer::getRenderer($format) will raise InvalidArgumentException in this case. The exception will be processed and the html renderer will be created.
| Labels |
Added:
No Code Attached Yet
|
||