[BUGFIX] Fix fatal error in extension manager 56/22656/2
authorMichael Stucki <michael.stucki@typo3.org>
Mon, 29 Jul 2013 12:16:23 +0000 (14:16 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 3 Aug 2013 11:49:50 +0000 (13:49 +0200)
TER extensions which were uploaded just recently contain a change in
ext_emconf.php. This change conflicts with older TYPO3 releases:

If the extension has no conflicts, the constraint is written as an empty
string although it is expected to be an array in any case.

This fix adds a check to work around the problem.

Change-Id: Ibb361f82c39d99089ec6455935ddc3e775cebbc7
Resolves: #46642
Releases: 4.7, 4.5
Reviewed-on: https://review.typo3.org/22656
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/em/classes/tools/class.tx_em_tools.php

index 0dc9436..959fd2b 100644 (file)
@@ -387,8 +387,12 @@ final class tx_em_Tools {
         */
        public static function depToString($dep, $type = 'depends') {
                if (is_array($dep)) {
-                       unset($dep[$type]['php']);
-                       unset($dep[$type]['typo3']);
+                       if (isset($dep[$type]['php'])) {
+                               unset($dep[$type]['php']);
+                       }
+                       if (isset($dep[$type]['typo3'])) {
+                               unset($dep[$type]['typo3']);
+                       }
                        $s = (count($dep[$type])) ? implode(',', array_keys($dep[$type])) : '';
                        return $s;
                }