[BUGFIX] Do not iterate over empty logger configuration 53/54653/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Wed, 15 Nov 2017 14:23:32 +0000 (15:23 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 15 Nov 2017 14:44:06 +0000 (15:44 +0100)
Fixes PHP notices thrown by accessing non existing array key.

Resolves: #83004
Releases: master
Change-Id: Ib5ff0ace0c9eb9a9987693176c4bee25026e2eb8
Reviewed-on: https://review.typo3.org/54653
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Log/LogManager.php

index 7248661..4679e42 100644 (file)
@@ -183,6 +183,9 @@ class LogManager implements \TYPO3\CMS\Core\SingletonInterface, LogManagerInterf
         // Walk from general to special (t3lib, t3lib.db, t3lib.db.foo)
         // and search for the most specific configuration
         foreach ($explodedName as $partOfClassName) {
+            if (!isset($configuration[$partOfClassName])) {
+                break;
+            }
             if (!empty($configuration[$partOfClassName][$configurationKey])) {
                 $result = $configuration[$partOfClassName][$configurationKey];
             }