[TASK] Make LinkServiceTest notice free 07/56207/2
authorSascha Löffler <lsascha@gmail.com>
Fri, 16 Mar 2018 10:16:51 +0000 (11:16 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Mar 2018 12:41:56 +0000 (13:41 +0100)
Resolves: #84328
Releases: master
Change-Id: I2e8ae22db7c3e9853d6ae59d6c42f960001d5e74
Reviewed-on: https://review.typo3.org/56207
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/LinkHandling/LinkService.php
typo3/sysext/core/Tests/Unit/LinkHandling/LinkServiceTest.php

index 9e0e924..c89e04b 100644 (file)
@@ -50,7 +50,7 @@ class LinkService implements SingletonInterface
     {
         if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler'])) {
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler'] as $type => $handler) {
-                if (!is_object($this->handlers[$type])) {
+                if (!isset($this->handlers[$type]) || !is_object($this->handlers[$type])) {
                     $this->handlers[$type] = GeneralUtility::makeInstance($handler);
                 }
             }
index 094e69d..9cb91d2 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Core\Tests\Unit\LinkHandling;
 
 /*
@@ -20,11 +21,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 class LinkServiceTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * Data to resolve strings to arrays and vice versa, external, mail, page
      *
      * @return array