-
Notifications
You must be signed in to change notification settings - Fork 58
Sub-templates cannot access data #59
Comments
Hi! |
Mh... So the problem must be in the method for sub templates... |
Do you know where the method for sub templates is implemented? I couldn't find it yet... |
Can you send me your custom class and the template having problem. For now I do some tests and everything is working fine for me |
The (sub) template uses $_root to access a "global" variable. That call is causing the error message. |
I was able to fix this in Compiler.php method parseVarKey (line 2721ff):
|
Hi @webbird thanks for that, can you do a PR, I don't work on this project anymore but will accept Pull-Request ! |
Of course. :) |
(cherry picked from commit 97bb159)
I'm trying to define a sub template with
{template sub data}{/template}
Using this I got a fatal error because of data is set to protected
Fatal error: Uncaught Error: Cannot access protected property CAT_Helper_Template_DwooDriver::$data in /[...]/templates/backstrap/templates/default/backend_nav_sidebar.tpl.d132.php:26
I'm using a child class, that extends Dwoo\Core to handle templates. Everything works fine with 1.1.0 as $data was set public. Is there a reason why this had been changed in current version?
The text was updated successfully, but these errors were encountered: