Bug #15930
closedImporting/installing skin_grey_2 in 4.0 RC2 reports Invalid argument supplied for foreach() .. class.em_index.php
0%
Description
As the extension itself has not changed since I successfully loaded it into 4.0 RC1, and as I did not run into this error in RC1, I am reporting this for the Extension Manager.
Importing skin_grey_2 version 0.0.1 (according to http://typo3.org/extensions/repository/search/skin_grey_2/0.0.1/details/ that is created 25.03.2006 - 18:47) from TER into 4.0 RC2 gives me
Warning: Invalid argument supplied for foreach() in [...]/typo3_src-4.0rc2/typo3/mod/tools/em/class.em_index.php on line 3956
Next, installing it yields the same error. It seems that the end result is fine though (the skin looks good). Even uninstalling gives the same error.
I uninstalled and removed the extension, cleared temp_CACHED files in typo3conf and imported and installed again -- with the same error.
The error occurs in:
3950 function checkDependencies($extKey, $conf, $instExtInfo) {
:
3956 foreach($conf['constraints']['depends'] as $depK => $depV) {
It might very well only apply to extensions that have no dependencies, as the generated ext_emconf.php for skin_grey_2 shows (partially copied)
'title' => 'Gray/orange skin for TYPO3 4.0',
'constraints' => array(
'' => array(
'' => '',
),
),
The "constraints" item looks different from, for example, t3skin:
'title' => 'TYPO3 skin',
'constraints' => array(
'depends' => array(
'php' => '4.3.0-5.9.0',
'typo3' => '3.9.0-4.0',
),
'conflicts' => array(
),
'suggests' => array(
),
),
Likewise, tipafriend (which has no depencies either) shows:
'title' => 'Tip-A-Friend',
'constraints' => array(
'depends' => array(
),
'conflicts' => array(
),
'suggests' => array(
),
),
So maybe the extension is wrong, but again: I did not get this error in 4.0 RC1 and maybe more (erroneous) extensions will now suddenly show the same error. To avoid this, an additional check for a value for
$conf['constraints']['depends']
might avoid existing extensions from breaking?
(issue imported from #M3033)