[TASK] Specific exception in ArrayUtility::removeByPath()
Similar to getValueByPath(), removeByPath() now throws a specific exception if the path to remove does not exist in given array to avoid catching global \RuntimeException' in consuming code. The same "MissingArrayPathException" is used here since both cases have identical semantic. Change-Id: I69447c47d24e28110cf03929ea5ed28cf5e43024 Resolves: #83636 Related: #83615 Releases: master Reviewed-on: https://review.typo3.org/55424 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Reiner Teubner <reiner.teubner@me.com> Reviewed-by:
Helmut Hummel <typo3@helhum.io> Tested-by:
Helmut Hummel <typo3@helhum.io> Reviewed-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org>
Showing
- typo3/sysext/core/Classes/Utility/ArrayUtility.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Utility/ArrayUtility.php
- typo3/sysext/core/Classes/Utility/Exception/MissingArrayPathException.php 2 additions, 1 deletion...e/Classes/Utility/Exception/MissingArrayPathException.php
- typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php 17 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
Please register or sign in to comment