Bug #43874
array_merge_recursive_overrule: __UNSET can't unset array values
Status: | Resolved | Start date: | 2012-12-11 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Backend API | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.0 | Is Regression: | ||
PHP Version: | Sprint Focus: | |||
Complexity: | easy |
Description
If the $enableUnsetFeature parameter is true, array_merge_recursive_overrule you can unset values from the first array.
The phpDoc says:
* @param boolean $enableUnsetFeature If set, special values "__UNSET" can be used in the second array in order to unset array keys in the resulting array.
But in fact keys are only unset if they don't hold an array value. I see no reason why this should be like this. There should be the possibility to unset array values.
Related issues
Associated revisions
[BUGFIX] array_merge_recursive_overrule: __UNSET for array values
Using __UNSET on keys that hold array values does not unset them.
However the documentation does not mention this restriction.
Therefore this is considered a bug and fixed by this patch.
Resolves: #43874
Releases: 6.1, 6.0, 4.7
Change-Id: Ie9f96c6f608da7e91fec2bc639dba9f3bcc8f426
Reviewed-on: https://review.typo3.org/17096
Reviewed-by: Markus Klein
Reviewed-by: Wouter Wolters
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
[BUGFIX] array_merge_recursive_overrule: __UNSET for array values
Using __UNSET on keys that hold array values does not unset them.
However the documentation does not mention this restriction.
Therefore this is considered a bug and fixed by this patch.
Resolves: #43874
Releases: 6.1, 6.0, 4.7
Change-Id: Ie9f96c6f608da7e91fec2bc639dba9f3bcc8f426
Reviewed-on: https://review.typo3.org/17529
Reviewed-by: Markus Klein
Reviewed-by: Sebastian Michaelsen
Tested-by: Sebastian Michaelsen
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
[BUGFIX] array_merge_recursive_overrule: __UNSET for array values
Using __UNSET on keys that hold array values does not unset them.
However the documentation does not mention this restriction.
Therefore this is considered a bug and fixed by this patch.
Resolves: #43874
Releases: 6.1, 6.0, 4.7
Change-Id: Ie9f96c6f608da7e91fec2bc639dba9f3bcc8f426
Reviewed-on: https://review.typo3.org/17530
Reviewed-by: Wouter Wolters
Reviewed-by: Tobias Liebig
Tested-by: Tobias Liebig
History
#1 Updated by Markus Klein over 2 years ago
Although this feature is not used in the Core at all, we can't change that behavior easily since this is public API.
Hence this would require a deprecation period of at least two versions first.
#2 Updated by Sebastian Michaelsen over 2 years ago
I don't agree. It just changes the feature in a way to behave like it was documented.
It's very unlikely that someone used __UNSET on an array value which he doesn't want to be unset. So I don't expect anything to break.
#3 Updated by Tobias Liebig over 2 years ago
- Category set to Backend API
- Complexity set to easy
#4 Updated by Tobias Liebig over 2 years ago
I also think this change won't break anything.
#5 Updated by Sebastian Michaelsen over 2 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset c0defbe74e3992b07dce859024d51544c4c7b9ed.
#6 Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17529
#7 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17529
#8 Updated by Sebastian Michaelsen over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 2e3ad6942dc4b18471e377808e147098891f58c6.
#9 Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/17530
#10 Updated by Sebastian Michaelsen over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 04f83a858f61921ce12a3a1948f557449d60f444.