Closed jslegers closed 10 years ago
For arrays that contain only one element, (array_keys($tmp) == range(0, count($tmp) - 1) always returns true.
(array_keys($tmp) == range(0, count($tmp) - 1)
(array_keys($tmp) === range(0, count($tmp) - 1) works as expected.
(array_keys($tmp) === range(0, count($tmp) - 1)
My local test environment = Linux Mint + PHP 5.4.
This patch is identical to https://github.com/XaminProject/handlebars.php/pull/66, but applies to a different part of the code.
For arrays that contain only one element,
(array_keys($tmp) == range(0, count($tmp) - 1)
always returns true.(array_keys($tmp) === range(0, count($tmp) - 1)
works as expected.My local test environment = Linux Mint + PHP 5.4.
This patch is identical to https://github.com/XaminProject/handlebars.php/pull/66, but applies to a different part of the code.