[BUGFIX] Allow "0" as path segment in ArrayUtility 30/50430/8
authorHelmut Hummel <info@helhum.io>
Fri, 28 Oct 2016 23:17:53 +0000 (01:17 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 29 Oct 2016 09:40:24 +0000 (11:40 +0200)
commitb60491d4e8f1d1fd67ee50adcd07f592bab5d17d
tree045068d446c73534cdeef4ec43fd645fe20a7cfb
parent95f6be32b2d7c23c61552fef34c81eaffc3cb854
[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/50430
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php