Skip to content

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

Merged
wisskid merged 4 commits intosupport/4from
bugfix/1100_modifier_called_like_a_function_compiled_to_modifier_name_not_callback
Feb 13, 2025
Merged

Bugfix/1100 modifier called like a function compiled to modifier name not callback#1101
wisskid merged 4 commits intosupport/4from
bugfix/1100_modifier_called_like_a_function_compiled_to_modifier_name_not_callback

Conversation

@wisskid
Copy link
Copy Markdown
Member

@wisskid wisskid commented Feb 3, 2025

No description provided.

@wisskid
Copy link
Copy Markdown
Member Author

wisskid commented Feb 3, 2025

Fixes #1100

@rudiedirkx
Copy link
Copy Markdown

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. 👍

@wisskid
Copy link
Copy Markdown
Member Author

wisskid commented Feb 13, 2025

Actually, I don't think that changed (it was compiled like that anyway), but when investigating, I found unintentional changes which I fixed in the last commit.

@wisskid wisskid merged commit 5cb412d into support/4 Feb 13, 2025
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