Skip to content
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

getTemplateVars - why the change in return signature in smarty 5? #994

Closed
demeritcowboy opened this issue Apr 13, 2024 · 2 comments
Closed

Comments

@demeritcowboy
Copy link

demeritcowboy commented Apr 13, 2024

Short version: Any code that calls getTemplateVars() breaks with smarty5 because it's expecting an array of values, and instead getting an array of objects.

Slightly longer version: At the very least the change seems inconsistent. If you pass in a variable name, it returns its value not the object. Either it should always return an object, or not be a breaking change and do what it did before.

What was the reason for the change, and should it be made more consistent (either way)?

@wisskid
Copy link
Contributor

wisskid commented Apr 13, 2024

You are correct, this was never intended. I've created #995
Does that fix this issue?

@demeritcowboy
Copy link
Author

Yes it does. Great! Thank you.

@wisskid wisskid closed this as completed Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants