[BUGFIX] Allow "0" as path segment in ArrayUtility 31/50431/3
authorHelmut Hummel <info@helhum.io>
Fri, 28 Oct 2016 23:17:53 +0000 (01:17 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 29 Oct 2016 11:14:35 +0000 (13:14 +0200)
commit9df5ce3ae7cf9d4fe3f1833814bac5de88c97a7e
tree619047fca24d83b19c76f053aa9ee066c236a0e3
parentd6b4de0d4c72e9195d0fdc2baab252c0d1c28578
[BUGFIX] Allow "0" as path segment in ArrayUtility

The empty() checks are too loose when checking for path segments
of an array, as "0" is a valid segment.
Instead we need to check for an empty string in the according places.

Also add a missing string check in getValueByPath.

Resolves: #78495
Releases: master, 7.6
Change-Id: I6b2a0c286c345aa94595a4a74da077bc8adea292
Reviewed-on: https://review.typo3.org/50431
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php