Project

General

Profile

Actions

Bug #29252

closed

Rewriting localconf.php endlessly expands lines with values containing two subsequent slashes ("//")

Added by Andreas Groth about 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2011-08-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

When the file localconf.php gets rewritten, and an extension's configuration value contains two subsequent slashes ("//"), the part from after the slashes until rest of the line is placed at the end of the newly generated comment. This is repeated each time localconf.php is written, so the comment is extended again and again. The rewriting does not take into account that "//" can be part of a value, but thinks that everything after the first "//" is.

This is no error but more a cosmetic problem. The comment can also be cut by editing the localconf.php, but otherwise the file may bloat unnoticed over time.

As far as I have seen, the problem can be corrected in the file t3lib/class.t3lib_install.php, in the function setValueInLocalconfFile()
where it says
$subparts = explode('//', $mainparts[1], 2);
The third parameter ("2") should be increased by the number of occurrences of "//" in the value (available in $value), and the subsequent uses of $subparts[1] should be replaced by end($subparts). Alternatively, "backslashing" the "/"s could work.


Files

bug_29252.diff (2.49 KB) bug_29252.diff Andreas Groth, 2011-09-13 12:29
Actions

Also available in: Atom PDF