XaminProject / handlebars.php

Handlebars processor for php
331 stars 132 forks source link

Patch 2 for arrays that contain only one elements #69

Closed jslegers closed 10 years ago

jslegers commented 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) 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.