[BUGFIX] Fix warnings in em on tab Maintenance 24/17724/2
authorPhilipp Gampe <philipp.gampe@typo3.org>
Thu, 9 Aug 2012 15:06:25 +0000 (17:06 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 25 Jan 2013 22:49:55 +0000 (23:49 +0100)
One variable is used without checking if it is set and on the other
place an array key is used twice which is just a mistake of the coder.

Change-Id: I78576e0ef7b8ca0b63ae94f74e2a5dfec659d716
Fixes: #39680
Releases: 4.5, 4.6, 4.7
Reviewed-on: https://review.typo3.org/17724
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
typo3/sysext/em/classes/install/class.tx_em_install.php

index 2051a06..5f859d8 100644 (file)
@@ -764,7 +764,7 @@ class tx_em_Connection_ExtDirectServer {
                                        '<a class="t3-link emconfLink" href="#"><strong>' . $updateEMConf . '</strong> ' .
                                        sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extDelete_from_location'),
                                                $api->typeLabels[$list[$extKey]['type']],
-                                               substr(tx_em_Tools::getExtPath($extKey, $list[$extKey]['type']['type']), strlen(PATH_site))
+                                               substr(tx_em_Tools::getExtPath($extKey, $list[$extKey]['type']), strlen(PATH_site))
                                        ) . '</a>'
                                        . '</td></tr>';
 
index e5b1517..85d7cfa 100644 (file)
@@ -705,7 +705,7 @@ class tx_em_Install {
                                $this->api->typeLabels[$extInfo['type']]
                        );
                } elseif (t3lib_div::inList('G,L', $extInfo['type'])) {
-                       if ($command['doDelete'] && !strcmp($absPath, urldecode($command['absPath']))) {
+                       if (!empty($command['doDelete']) && !strcmp($absPath, urldecode($command['absPath']))) {
                                $res = $this->removeExtDirectory($absPath);
                                if ($res) {
                                        if (!$this->silentMode) {