Project

General

Profile

Actions

Bug #44282

closed

EM: fatal error if 'conflicts' is empty string in stead of array

Added by Egbert van der Hout over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2013-01-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #46642: Fatal error: Cannot unset string offsets in typo3/sysext/em/classes/tools/class.tx_em_tools.php on line 382ClosedMichael Stucki2013-03-25

Actions
Actions #1

Updated by Egbert van der Hout over 11 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.

Actions #2

Updated by Andreas Wolf over 11 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.

Actions #3

Updated by Christian Ferbar about 11 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 '';
}

Actions #4

Updated by Wouter Wolters over 10 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/

Actions

Also available in: Atom PDF