Skip to content
Snippets Groups Projects
Commit 7f2c9573 authored by Mathias Brodala's avatar Mathias Brodala Committed by Christian Kuhn
Browse files

[TASK] Throw explicit exception on missing link handler class

This adds the link handler identifier to the error message which
makes it easier to fix the missing class reference.

Resolves: #81205
Releases: master, 8.7, 7.6
Change-Id: I0ce610f7ec167704d5cbc5de20d43639c18e3fc1
Reviewed-on: https://review.typo3.org/52787


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarElmar Hinz <t3elmar@gmail.com>
Reviewed-by: default avatarHenrik Elsner <helsner@dfau.de>
Tested-by: default avatarHenrik Elsner <helsner@dfau.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent f8a63d89
Branches
Tags
No related merge requests found
...@@ -244,6 +244,11 @@ abstract class AbstractLinkBrowserController ...@@ -244,6 +244,11 @@ abstract class AbstractLinkBrowserController
$lang = $this->getLanguageService(); $lang = $this->getLanguageService();
foreach ($linkHandlers as $identifier => $configuration) { foreach ($linkHandlers as $identifier => $configuration) {
$identifier = rtrim($identifier, '.'); $identifier = rtrim($identifier, '.');
if (empty($configuration['handler'])) {
throw new \UnexpectedValueException(sprintf('Missing handler for link handler "%1$s", check page TSconfig TCEMAIN.linkHandler.%1$s.handler', $identifier), 1494579849);
}
/** @var LinkHandlerInterface $handler */ /** @var LinkHandlerInterface $handler */
$handler = GeneralUtility::makeInstance($configuration['handler']); $handler = GeneralUtility::makeInstance($configuration['handler']);
$handler->initialize( $handler->initialize(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment