8000 class properties in Context.php have to be prefixed · Issue #59 · SC-Networks/PHPTAL · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

class properties in Context.php have to be prefixed #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
usox opened this issue Aug 10, 2018 · 0 comments
Closed

class properties in Context.php have to be prefixed #59

usox opened this issue Aug 10, 2018 · 0 comments
Assignees
Labels

Comments

@usox
Copy link
Member
usox commented Aug 10, 2018

tal creates internal properties in Context.php on the fly, so it can conflict with already existing properties like slots.

The following code tries to access slots and fails. After renaming the internal slots property, it works again. I guess that's the cause for the underscore-prefix in the original tal version. __set also checks explicitly for underscores in variable names before setting them

<div>
<span tal:omit-tag="" tal:repeat="slots SOMETHING">
<span tal:repeat="slot slots">FNA</span>
</span>
</div>
@usox usox added the bug label Aug 10, 2018
MarcusSchwarz pushed a commit to MarcusSchwarz/PHPTAL that referenced this issue Aug 10, 2018
MarcusSchwarz pushed a commit to MarcusSchwarz/PHPTAL that referenced this issue Aug 10, 2018
MarcusSchwarz pushed a commit to MarcusSchwarz/PHPTAL that referenced this issue Aug 10, 2018
MarcusSchwarz pushed a commit to MarcusSchwarz/PHPTAL that referenced this issue Aug 10, 2018
usox pushed a commit that referenced this issue Aug 10, 2018
usox pushed a commit that referenced this issue Aug 10, 2018
@usox usox closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0