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

Bugfix/1100 modifier called like a function compiled to modifier name not callback #1101

Open
wants to merge 3 commits into
base: support/4
Choose a base branch
from

Conversation

wisskid
Copy link
Member

@wisskid wisskid commented Feb 3, 2025

No description provided.

@wisskid
Copy link
Member Author

wisskid commented Feb 3, 2025

Fixes #1100

@rudiedirkx
Copy link

Yes, this fixes. But now every call goes through the plugin system:

<?php if (call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'can' ][ 0 ], array( 'foo' ))) {?>
        <?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'dump' ][ 0 ], array( $_smarty_tpl->tpl_vars['title']->value ));?>
<?php }?>

and I did like the efficiency of the previous (bug buggy) compilation:

<?php if (can('foo')) {?>

but this is definitely better. Bug fixed. 👍

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

Successfully merging this pull request may close these issues.

2 participants