Fix bug: unexpected array conversion when object given to {foreach} with force verify option

This commit is contained in:
bzick 2015-02-10 14:30:31 +03:00
parent d5417630ac
commit a9b9c89f88

View File

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