XaminProject / handlebars.php

Handlebars processor for php
331 stars 132 forks source link

unable to "0" as an array key in HandleBars_Context #30

Closed LouisJohnson closed 10 years ago

LouisJohnson commented 10 years ago

HandleBars_Context#247 uses empty($inside) which returns true for the string "0"

thus preventing use of tags such as "array.0.name"

suggestion: if (($inside !== "0" && empty( $inside )) || ( $inside == 'this' ) ) {

everplays commented 10 years ago

thanks @LouisJohnson, I used your snippet and it's now fixed in both master and php-52 branches.