Open stvogel opened 11 years ago
I will look into this at some point. The 5.4 requirement is explained in issue #1. I am likely going to come back to this project and rewrite it all in native PHP but lately I have not put any effort into this project.
I've adapted the generated PHP-Code, so that it works with 5.3. It was quite easy. Thanks for looking into the issue. You're right. It might be worth a thought to rewrite it in native PHP. The source code is a bit ... blown up :-)
Other values causing issues: link, unlink "Warning: unlink() expects parameter 1 to be string, object given in /home/oskar/www/library/dust-php/Evaluate/Evaluator.php on line 342"
Can this be hack-fixed in some way until you update it with a better solution? (So that parameters always remain parameters)
Thanks a lot, btw!
I use php 5.5 and i have the sаme problem.
I've found a solution for this problem:
public function normalizeResolved(Context $ctx, $resolved, Chunk $chunk, Ast\Section $section = null) {
$handledSpecial = true;
while ($handledSpecial) {
if (is_callable($resolved) && !is_string($resolved)) {
...
the following produces: $template = $dust->compile('Title:{title}'); $dust->renderTemplate($template, array('title' => 'current'));
'Title: Dust\Evaluate\Evaluator'
I suppose that's on purpose, but it differs from the dust.js version
Otherwise thanks for your port to php. I would really like to see a port to PHP 5.3 especially because the code really only uses the array-initialization of PHP 5.4.