Bug #46642

Fatal error: Cannot unset string offsets in typo3/sysext/em/classes/tools/class.tx_em_tools.php on line 382

Added by Peter Linzenkirchner almost 6 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2013-03-25
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

when uploading an extension to TER (TYPO3 4.5) the $EM_CONF[$_EXTKEY] = array becomes wrong:

original php code:

$EM_CONF[$_EXTKEY] = array (
    //snip
    array (
        'depends' => array (
            'typo3' => '4.5.0-6.0.99'
        ),
        'conflicts' => array(

        ),
        'suggests' => array (

        ),
    ),
    //snip

becomes after uploading:

    array (
        'depends' => 
        array (
            'typo3' => '4.5.0-6.0.99',
            '' => '',
        ),
        'conflicts' => '',
        'suggests' => 
        array (
        ),
    ),

which leads to the following error in the extension manager of TYPO3 4.5.x:

Fatal error: Cannot unset string offsets in typo3/sysext/em/classes/tools/class.tx_em_tools.php on line 382
I had to edit the em_conf.php manually in order to get rid of this error in the backend.

46642.diff View (737 Bytes) Franz Holzinger, 2013-07-26 17:36


Related issues

Duplicated by TYPO3 Core - Bug #46611: 4.5 EM crashes, if ext_emconf entry is string instead of array Closed 2013-03-23
Duplicated by TYPO3 Core - Bug #44282: EM: fatal error if 'conflicts' is empty string in stead of array Closed 2013-01-03

Associated revisions

Revision b7b400c6 (diff)
Added by Michael Stucki over 5 years ago

[BUGFIX] Fix fatal error in extension manager

TER extensions which were uploaded just recently contain a change in
ext_emconf.php. This change conflicts with older TYPO3 releases:

If the extension has no conflicts, the constraint is written as an empty
string although it is expected to be an array in any case.

This fix adds a check to work around the problem.

Change-Id: Ibb361f82c39d99089ec6455935ddc3e775cebbc7
Resolves: #46642
Releases: 4.7, 4.5
Reviewed-on: https://review.typo3.org/22657
Reviewed-by: Tomita Militaru
Tested-by: Tomita Militaru
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

Revision 9731f60c (diff)
Added by Michael Stucki over 5 years ago

[BUGFIX] Fix fatal error in extension manager

TER extensions which were uploaded just recently contain a change in
ext_emconf.php. This change conflicts with older TYPO3 releases:

If the extension has no conflicts, the constraint is written as an empty
string although it is expected to be an array in any case.

This fix adds a check to work around the problem.

Change-Id: Ibb361f82c39d99089ec6455935ddc3e775cebbc7
Resolves: #46642
Releases: 4.7, 4.5
Reviewed-on: https://review.typo3.org/22656
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Daniel Hürtgen over 5 years ago

Same here ... also fixed by edit ext_emconf.php manually.

#2 Updated by Franz Holzinger over 5 years ago

Still present in TYPO3 4.5.28

Fatal error: Cannot unset string offsets in /var/www/user/typo3_src-4.5.28/typo3/sysext/em/classes/tools/class.tx_em_tools.php on line 390

Use this patch to get the Extension Manager running again.

#3 Updated by Franz Holzinger over 5 years ago

#4 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/22656

#5 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/22657

#6 Updated by Michael Stucki over 5 years ago

I investigated the problem and have submitted patches to fix the issue in 4.5 and 4.7.
Interestingly, the problem does not occur in 6.0+ versions because the new extension manager contained the fix since the beginning.

#7 Updated by Michael Stucki over 5 years ago

  • Project changed from TER Team to TYPO3 Core

Moving to TYPO3 CMS: Core

#8 Updated by Michael Stucki over 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Michael Stucki
  • TYPO3 Version set to 4.5

#9 Updated by Michael Stucki over 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

#10 Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF