Project

General

Profile

Actions

Bug #43874

closed

array_merge_recursive_overrule: __UNSET can't unset array values

Added by Sebastian Michaelsen almost 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2012-12-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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 1 (0 open1 closed)

Related to TYPO3 Core - Feature #33941: Add possibility to unset parts in t3lib_div::array_merge_recursive_overrule()ClosedOliver Hader2012-02-15

Actions
Actions #1

Updated by Markus Klein almost 12 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.

Actions #2

Updated by Sebastian Michaelsen almost 12 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.

Actions #3

Updated by Tobias Liebig almost 12 years ago

  • Category set to Backend API
  • Complexity set to easy
Actions #4

Updated by Tobias Liebig almost 12 years ago

I also think this change won't break anything.

Actions #5

Updated by Sebastian Michaelsen almost 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Gerrit Code Review almost 12 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

Actions #7

Updated by Gerrit Code Review almost 12 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

Actions #8

Updated by Sebastian Michaelsen almost 12 years ago

  • Status changed from Under Review to Resolved
Actions #9

Updated by Gerrit Code Review almost 12 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

Actions #10

Updated by Sebastian Michaelsen almost 12 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF