Skip to content
Snippets Groups Projects
Commit 0ffc91c4 authored by Helmut Hummel's avatar Helmut Hummel Committed by Markus Klein
Browse files

[BUGFIX] Avoid renumbering array keys on writing configuration

Renumbering array keys, even if all keys are integer
is a destructive operation.
Doing so at least breaks our logging configuration,
which uses LogLevel constants as array keys and these constants
are defined as integer.

Therefore this pure visual optimization is removed
when writing LocalConfiguration.php

At a later point we might consider deprecating this
method, which at least has a wrong method name
(mentions "numeric", while it meanwhile uses "int" checks).
As this method performs a destructive operation,
its usefulness is limited.

Resolves: #82304
Releases: master, 8.7, 7.6
Change-Id: I8d252428f3e27379e4377d30af0fdfd5e5d8719d
Reviewed-on: https://review.typo3.org/55944


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent c5b7dbbc
Branches
Tags
No related merge requests found
......@@ -322,9 +322,7 @@ class ConfigurationManager
$localConfigurationFile,
'<?php' . LF .
'return ' .
ArrayUtility::arrayExport(
ArrayUtility::renumberKeysToAvoidLeapsIfKeysAreAllNumeric($configuration)
) .
ArrayUtility::arrayExport($configuration) .
';' . LF,
true
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment