Bug #43874

array_merge_recursive_overrule: __UNSET can't unset array values

Added by Sebastian Michaelsen over 8 years ago. Updated over 2 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

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

Actions
#1

Updated by Markus Klein over 8 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 8 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 8 years ago

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

Updated by Tobias Liebig over 8 years ago

I also think this change won't break anything.

#5

Updated by Sebastian Michaelsen over 8 years ago

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

Updated by Gerrit Code Review over 8 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 8 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 8 years ago

  • Status changed from Under Review to Resolved
#9

Updated by Gerrit Code Review over 8 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 8 years ago

  • Status changed from Under Review to Resolved
#11

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF