[BUGFIX] Only reorder integer keys in ArrayUtility 05/53805/2
authorSusanne Moog <susanne.moog@typo3.com>
Fri, 25 Aug 2017 05:17:57 +0000 (07:17 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 31 Aug 2017 14:27:22 +0000 (16:27 +0200)
PHP already converts strings representing 8-bit integers
to int - so there are no numeric array keys that are
of type string that ArrayUtility should reorder.

Change-Id: Ieff77f4b1b8d6cbadba73dad06e9ec02d8748e85
Resolves: #82201
Releases: master
Reviewed-on: https://review.typo3.org/53805
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jan Stockfisch <jan.stockfisch@googlemail.com>
Reviewed-by: Sascha Rademacher <sascha.rademacher+typo3@gmail.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/ArrayUtility.php

index c4bd977..7610f30 100644 (file)
@@ -572,7 +572,7 @@ class ArrayUtility
         $level++;
         $allKeysAreNumeric = true;
         foreach ($array as $key => $_) {
-            if (is_numeric($key) === false || (is_string($key) && StringUtility::endsWith($key, '.'))) {
+            if (is_int($key) === false) {
                 $allKeysAreNumeric = false;
                 break;
             }