@sgiehl opened this Pull Request on December 8th 2020 Member


Some of the tests actually had results that are not fully correct.

This peace of code actually returns true on PHP7 while it returns false on PHP 8:

$array = ['a' => 'b'];

return array_keys($array) == array_keys(array_fill(0, count($array), true)); // ['a'] == [0]

Comparing with === instead should have the same result on both versions.

If I understand the code correct it tries to check for default numeric indices. Comparing with === requires the keys to be of the same type and in the same order. Imho that should be correct as an array with shuffled order should imho not be handled as having default indices.

refs #16897


  • [ ] Functional review done
  • [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • [ ] Security review done see checklist
  • [ ] Code review done
  • [ ] Tests were added if useful/possible
  • [ ] Reviewed for breaking changes
  • [ ] Developer changelog updated if needed
  • [ ] Documentation added if needed
  • [ ] Existing documentation updated if needed
This Pull Request was closed on December 10th 2020
Powered by GitHub Issue Mirror