Bug #44282
closedEM: fatal error if 'conflicts' is empty string in stead of array
0%
Description
When an extension has 'conflicts' => '' in its ext_emconf.php in stead of 'conflicts' => array(...) an PHP Fatal Error occures in /typo3/sysext/em/classes/tools/class.tx_em_tools.php, line 382 (T3 4.7.7). I think this function (depToString) should be a little less sensitive to such an error.
Updated by Egbert van der Hout almost 12 years ago
Ok. A little update. Apparently TYPO3 6.0 has a different format for this array element ['constraints']['conflicts']: empty string in stead of empty array. So if you've fetched an extension via the T3 6.0 Extension Manager don't copy it to an older TYPO3 installation.
Updated by Andreas Wolf almost 12 years ago
- Category set to Extension Manager
- Complexity set to easy
Egbert van der Hout wrote:
Ok. A little update. Apparently TYPO3 6.0 has a different format for this array element ['constraints']['conflicts']: empty string in stead of empty array. So if you've fetched an extension via the T3 6.0 Extension Manager don't copy it to an older TYPO3 installation.
You're right, the format changed during the introduction of the "new" extension manager. But nonetheless, we should fix this in 4.7.
Updated by Christian Ferbar almost 12 years ago
I suggest a check if $dep[$type] is an array
public static function depToString($dep, $type = 'depends') {
if (is_array($dep)) {
if(is_array($dep[$type])) {
unset($dep[$type]['php']);
unset($dep[$type]['typo3']);
}
$s = (count($dep[$type])) ? implode(',', array_keys($dep[$type])) : '';
return $s;
}
return '';
}
Updated by Wouter Wolters over 11 years ago
- Status changed from New to Closed
This duplicates #46642 and is currently under review. Please review that patch at https://review.typo3.org/#/c/22657/