[TASK] Throw explicit exception on missing link handler class 87/52787/2
authorMathias Brodala <mbrodala@pagemachine.de>
Fri, 12 May 2017 09:07:19 +0000 (11:07 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 12 May 2017 12:09:31 +0000 (14:09 +0200)
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: TYPO3com <no-reply@typo3.com>
Reviewed-by: Elmar Hinz <t3elmar@gmail.com>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Tested-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php

index 694447f..d96b6ee 100644 (file)
@@ -244,6 +244,11 @@ abstract class AbstractLinkBrowserController
         $lang = $this->getLanguageService();
         foreach ($linkHandlers as $identifier => $configuration) {
             $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 */
             $handler = GeneralUtility::makeInstance($configuration['handler']);
             $handler->initialize(