[BUGFIX] Give correct information in addLLrefForTCAdescr exception 27/55327/2
authorNicole Cordes <typo3@cordes.co>
Wed, 10 Jan 2018 17:34:14 +0000 (18:34 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 11 Jan 2018 11:15:34 +0000 (12:15 +0100)
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr
needs a non-empty key as first parameter. Otherwise an exception is
thrown but the message shows wrong information.

Resolves: #83532
Releases: master
Change-Id: I59c44b2b4aafcbbee679662ecab667c85f7a25dc
Reviewed-on: https://review.typo3.org/55327
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index 0d71729..067bf50 100644 (file)
@@ -990,7 +990,7 @@ class ExtensionManagementUtility
     public static function addLLrefForTCAdescr($key, $file)
     {
         if (empty($key)) {
-            throw new \RuntimeException('No extension key set in addLLrefForTCAdescr(). Provide it as third parameter', 1507321596);
+            throw new \RuntimeException('No description key set in addLLrefForTCAdescr(). Provide it as first parameter', 1507321596);
         }
         if (!is_array($GLOBALS['TCA_DESCR'][$key] ?? false)) {
             $GLOBALS['TCA_DESCR'][$key] = [];