[BUGFIX] EmConfUtility accesses non-arrays
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Utility / EmConfUtility.php
index 6e19894..fdbbf5c 100644 (file)
@@ -132,17 +132,14 @@ $EM_CONF[$_EXTKEY] = ' . $emConf . ';
         * @return string A simple dependency list for display
         */
        static public function dependencyToString($dependency, $type = 'depends') {
-               if (is_array($dependency)) {
-                       if (isset($dependency[$type]['php'])) {
-                               unset($dependency[$type]['php']);
-                       }
-                       if (isset($dependency[$type]['typo3'])) {
-                               unset($dependency[$type]['typo3']);
-                       }
-                       $dependencyString = count($dependency[$type]) ? implode(',', array_keys($dependency[$type])) : '';
-                       return $dependencyString;
+               if (!is_array($dependency) || !is_array($dependency[$type])) {
+                       return '';
                }
-               return '';
+
+               unset($dependency[$type]['php']);
+               unset($dependency[$type]['typo3']);
+
+               return implode(',', array_keys($dependency[$type]));
        }
 
        /**