Merge pull request #148 from fenom-template/develop

Fix bug: unexpected array conversion when object given to {foreach} with...
This commit is contained in:
Ivan Shalganov 2015-02-10 14:37:55 +03:00
commit 45a3abed88
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ class Compiler
$check = '!empty('.$from.')';
} else {
$scope["var"] = $scope->tpl->tmpVar();
$prepend = $scope["var"].' = (array)('.$from.');';
$prepend = $scope["var"].' = '.$from.';';
$from = $check = $scope["var"];
}
} elseif ($tokens->is('[')) {