Bug #43874

array_merge_recursive_overrule: __UNSET can't unset array values

Added by Sebastian Michaelsen almost 7 years ago. Updated about 1 year ago.

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

100%

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() Closed 2012-02-15

Associated revisions

Revision c0defbe7 (diff)
Added by Sebastian Michaelsen almost 7 years ago

[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

Revision 2e3ad694 (diff)
Added by Sebastian Michaelsen over 6 years ago

[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

Revision 04f83a85 (diff)
Added by Sebastian Michaelsen over 6 years ago

[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 almost 7 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 almost 7 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 almost 7 years ago

  • Category set to Backend API
  • Complexity set to easy

#4 Updated by Tobias Liebig almost 7 years ago

I also think this change won't break anything.

#5 Updated by Sebastian Michaelsen almost 7 years ago

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

#6 Updated by Gerrit Code Review almost 7 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 almost 7 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 6 years ago

  • Status changed from Under Review to Resolved

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

  • Status changed from Under Review to Resolved

#11 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF