Project

General

Profile

Actions

Bug #92561

closed

f:variable with an array should insert keys when variable already exists

Added by Wolfgang Klinger over 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2020-10-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Example

<f:variable name="settings" value="{'maxWidth': '200'}" />

should not remove/replace the existing settings variable,
but just add the key with the value into the existing 'settings' array variable.

That's what I would expect, default case = common sense, how software should work.

If required I would add a new property 'replace=true/false' to allow the other (much less expected) behaviour.

Actions #1

Updated by Christoph Lehmann over 3 years ago

Why not simple use another variable name? I don't see a bug in the current behaviour.

Actions #2

Updated by Simon Schaufelberger almost 2 years ago

  • Status changed from New to Closed

If you want to set a different variable, use the "Alias" ViewHelper for a sub section or the variable viewhelper, that will overwrite the settings (which is always automatically assigned to every template) in this case like this:

$this->variables[$identifier] = $value;
Actions

Also available in: Atom PDF