Closed AeonFr closed 5 years ago
done #3.28
Each section is cache. So I destroy the cache each time we run() the template.
Thanks! I had a hard time finding the issue when it came out. Sorry for saying I would try to fix it, I totally forgot and had other things in mind.
Thanks again
Hello.
I found out Blade One is not properly injecting variables after calling the same template twice, but only if the template uses an
@extends
tag.I have the following code to reproduce the issue:
So basically this works at expected and prints "1, 2" if the given template is something like this:
But it fails (prints "1, 1") in the following case:
Basically the issue happens when the name of one of the template's variables is equal to the name of a section.
~I know this is very easy to work around (just rename a variable or section), but on the other hand it was really difficult to identify, so I think it would be nice if this could be addressed sometime.~
Edit: This issue doesn't seem to be related to the name of the $content variable being the same as the name of the section.
I will dig a little bit in the source code if I have some time in the weekend and try to fix it.