Issue Bug Closed

#107199Outdated default value for ['TYPO3_CONF_VARS']['BE']['lockRootPath']

Albrecht Köhnlein 08/04/25, 06:55 updated 12/02/25, 13:58

Description

Adding this line to $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'][] = '/path/to/shared'; to additional.php does cause an error:

> Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/html/config/system/additional.php:12 Stack trace: #0 /var/www/html/vendor/typo3/cms-core/Classes/Configuration/ConfigurationManager.php(378): require() #1 /var/www/html/vendor/typo3/cms-core/Classes/Core/Bootstrap.php(323): TYPO3\CMS\Core\Configuration\ConfigurationManager->exportConfiguration() #2 /var/www/html/vendor/typo3/cms-core/Classes/Core/Bootstrap.php(89): TYPO3\CMS\Core\Core\Bootstrap::populateLocalConfiguration() #3 /var/www/html/public/index.php(20): TYPO3\CMS\Core\Core\Bootstrap::init() #4 /var/www/html/public/index.php(21): {closure:/var/www/html/public/index.php:17}() #5 {main} thrown in /var/www/html/config/system/additional.php on line 12

But adding $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'][0] = '/path/to/shared'; works.

Thanks to Peter Kraume to find this problem: https://phpc.social/@cybersmog/114959323771560230

Reviews 4

History 916

  1. Gerrit Code Review pushed patch set 1 for main to change 90227 status New Under Review 08/04/25, 06:57

  2. Albrecht Köhnlein changed description 08/04/25, 06:58

  3. Albrecht Köhnlein changed description 08/04/25, 06:58

  4. Oliver Hader commented 08/04/25, 07:59

    The behavior has been introduced in this change:
    https://review.typo3.org/c/Packages/TYPO3.CMS/+/82957

  5. Albrecht Köhnlein changed description 08/04/25, 08:55

  6. Albrecht Köhnlein changed Related to #82957 08/04/25, 08:56

  7. Albrecht Köhnlein changed Related to #82957 08/04/25, 08:56

  8. Gerrit Code Review pushed patch set 2 for main to change 90227 08/04/25, 09:17

  9. Gerrit Code Review pushed patch set 3 for main to change 90227 08/04/25, 09:20

  10. Gerrit Code Review pushed patch set 4 for main to change 90227 08/04/25, 09:31

  11. Gerrit Code Review pushed patch set 5 for main to change 90227 08/04/25, 09:35

  12. Oliver Hader commented 08/04/25, 10:35

    The previous behavior only supported one single path. Thus, I’m assuming it was not string concatenated, but directly assigned (e.g. $lockRootPath = '/other').

     default overridden in settings.php adjusted in custom code result
    '' none $lockRootPath = '/other' ok (string fallback)
    '' none $lockRootPath[] = '/other' fails
    '' '/my-path' $lockRootPath = '/other' ok (string fallback)
    '' '/my-path' $lockRootPath[] = '/other' fails
    '' ['/my-path'] $lockRootPath = '/other' ok (string fallback)
    '' ['/my-path'] $lockRootPath[] = '/other' ok (array)
    [] none $lockRootPath = '/other' ok (string fallback)
    [] none $lockRootPath[] = '/other' ok (array)
    [] '/my-path' $lockRootPath = '/other' ok (string fallback)
    [] '/my-path' $lockRootPath[] = '/other' ok (array)
    [] ['/my-path'] $lockRootPath = '/other' ok (string fallback)
    [] ['/my-path'] $lockRootPath[] = '/other' ok (array)
  13. Gerrit Code Review pushed patch set 1 for 13.4 to change 90236 08/04/25, 13:49

  14. Gerrit Code Review pushed patch set 1 for 12.4 to change 90237 08/04/25, 13:52

  15. Albrecht Köhnlein commented and changed status Under Review Resolved done 0 % 100 % 08/04/25, 14:10

    Applied in changeset commit:c475fed45cae8d4f91bd0bffd2841f792561162b.

  16. Benni Mack changed status Resolved Closed 12/02/25, 13:58