fabpot/Twig — Issue #466: Difference between set and set/endset tags
Author: Abhoryo
Created: 2011-10-13 12:29:19+00:00
State: open

This example works but not the second. The variable foo1 and foo2, however, are identical.

```
{% set foo1 = 'js/myscript.js' %}
{{ foo1 }}
{{ asset(foo1) }}
```

Display:

```
js/myscript.js
/js/myscript.js
```

```
{% set foo2 %}
js/myscript.js
{% endset %}
{{ foo2 }}
{{ asset(foo2) }}
```

Display:

```
js/myscript.js

Connot use object of type Twig_Markup as array in \vendor\symfony\src\Symfony\Component\Templating\Asset\PathPackage.php on line 54

```