I'm helping a client with getting their website ready for PHP8. After doing the update to the latest Joomla and making sure the template is updated, it runs fine on PHP8. I do however get the following error only on one page. The page where you have to create a new user:
Error: Failed opening required
'/usr/www/users/kznden/libraries/joomla/document/html/renderer/head.php' (include_path='.:/usr/share/php'): Cannot access offset of type string on string
I know this path doesnt exist anymore but how can I get rid of this error and the page working again? I opened the error.php file and believe the error is related to that file. If I'm wrong, please correct me. Specifically the following code:
$doc->setTitle($this->error->getCode() . ' - '.$this->title);
require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');
$header_renderer = new JDocumentRendererHead($doc);
$header_contents = $header_renderer->render(null);
Removing
require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');
doesn't seem to fix the issue.