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

Deprecated warning for implode #1098

Open
omitech opened this issue Jan 16, 2025 · 0 comments
Open

Deprecated warning for implode #1098

omitech opened this issue Jan 16, 2025 · 0 comments

Comments

@omitech
Copy link

omitech commented Jan 16, 2025

Using implode in Smarty templates throws a deprecation warning, even when used with the correct argument order.
For example: {implode(',', $array)}

Despite being valid syntax, this still triggers a warning. Replacing implode() with join() and reversed argument order resolves the issue, but this requires changes to existing templates, which may not be ideal.

I believe, the deprecation warning should only be triggered if the arguments are provided in the incorrect order. If the syntax is correct, no warning should be raised.

I suggest trigger_errow should only be called if incorrect order of arguments is provided.

trigger_error("Using implode is deprecated. " .

Or would like clarification: Is implode officially deprecated in Smarty in favour of join (which actually an alias in php), or is this an unintended side effect? Is so, then overriding the default extensions could be a viable workaround: #1048

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

1 participant